Text this: Shaping long-lived electron wavepackets for customizable optical spectra