Longitudinal phase space manipulation is a critical and necessary component for advanced acceleration concepts, radiation sources and improving performances of X-ray free electron lasers. Here we present a simple and versatile method to semi-arbitrarily shape the longitudinal phase space of a charged bunch by using wakefields generated in tailored dielectric-lined waveguides. We apply the concept in simulation and provide examples for radiation generation and bunch compression. We finally discuss the manufacturing capabilities of a modern 3D printer and investigate how printing limitations, as well as the shape of the input LPS affect the performance of the device.