First-principles approach to excitons in time-resolved and angle-resolved photoemission spectra