[[!meta title="Atomgen"]] [[!meta date="2009-03-28 05:48:23"]] I've been using [Atom feeds][] to publish announcements to my course websites recently. The ‘please check this page daily for changes’ directives I saw on a few other pages were too painful to bear ;). I've written a little PHP script to convert the atom.xml into XHTML so non-atom students can still read the announcements online, and I've been using [rss2email][] in a cron job and a [procmail][] rule to automatically email the class any new announcements I post in the feed. It works rather well I think, even if noone ends up actually looking at the feed ;). Anyhow, I wrote up a little command line wrapper ([[atomgen.py]]) around [lxml][] atomgen -o atom.xml new --title 'Physics 201' --author 'W. Trevor King' \ http://www.physics.drexel.edu/~wking/phys201 echo "Changes to the Phys201 website will be noted in this feed." | \ atomgen -o atom.xml add -i atom.xml 'Feed purpose' \ http://www.physics.drexel.edu/~wking/phys201 [Atom feeds]: http://en.wikipedia.org/wiki/Atom_%28standard%29 [rss2email]: http://rss2email.infogami.com/ [procmail]: http://www.procmail.org/ [lxml]: http://codespeak.net/lxml/ [[!tag tags/blogging]] [[!tag tags/programming]] [[!tag tags/python]]