Some kind of templating system to generate the file locally, then upload.  But that seems like overkill...