how to calculate the fourier transform of this input?
If you write the function as the infinite sum of step functions shifted by a multiple if T, you'll see that there is no fundamental frequency.
You also can't ignore DC because what you described is a signal with infinite energy, so it is non-physical. If the signal you described repeats, then you'd have a fundamentalist frequency of the repeat.