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