Find below some scripts that do different, possibly helpful things.
edi-file-indenter.cgi string-format.cgi colourize.cgi
You can find the source code for these scripts here.