mkogg.py: Fix 'self.get_mp4_metadata(self, source)'
[blog.git] / posts / Atomgen.mdwn
index 77232d56d8ddcf1584d5cbef8540d0c21775808c..c37b9e377e66585a797953064df8ea0623f4f83e 100644 (file)
@@ -1,29 +1,30 @@
 [[!meta  title="Atomgen"]]
 [[!meta  date="2009-03-28 05:48:23"]]
-I've been using [Atom
-feeds](http://en.wikipedia.org/wiki/Atom_%28standard%29) 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](http://rss2email.infogami.com/) in a cron job and a
-[procmail](http://www.procmail.org/) 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 around Sylvain
-Hellegouarch's [Atomixlib](http://pypi.python.org/pypi/atomixlib/),
-which is based on [Amara](http://xml3k.org/Amara/) or
-[ElementTree](http://pypi.python.org/pypi/elementtree/).  However,
-Sylvain seems to be falling behind as ElementTree and Amara continue
-to evolve, so I recently rewrote my script to run off
-[Amara2](http://xml3k.org/Amara2) directly, since Amara's _bindery_
-interface is wonderful (well, for data manipulation anyway.
-Attributes, prefixes, and tree construction don't make much sense to
-me yet...).
+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 ;).
 
-You can grab my script and see some simple usage examples on my [code
-page](http://www.physics.drexel.edu/~wking/code/#atomgen).
+Anyhow, I wrote up a little command line wrapper ([[atomgen.py]])
+around [lxml][]
 
-[[!tag  programming]]
+    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]]