Did some coding today, for the first time in far too long (not counting Uni work, anyway). A while back, I wrote a quick-and-dirty PHP script to display the contents of the TermiSoc quotes database (which is just a text file in fortune format, i.e. delimited by \n%\n).

Anyway, I wanted to generate RSS output, but that was basically impossible without rewriting the entire script. So that’s what I did, in Python instead of the devil-language that is PHP. Source is in my git repo, live version is on zaphod.

The advantage of doing it this way is that it’s easily extensible to do basically any format; currently supported are HTML, Atom, and raw (i.e., fortune), with RSS, Yaml, and JSON in the works.