atom-tools' *NIX tools
atom-tools' bin directory has several UNIXy tools that I've never really mentioned before.
These tools operate on "collections". I'm using the term in a broader sense than RFC 5023; a "collection" can be an AtomPub Collection, a directory containing Atom Entries, or a feed on stdin or stdout.
atom-cp
atom-cp copies the contents of a source collection to a destination collection.
atom-grep
atom-grep prints a feed to stdout containing all the entries in the source feed that match a given regexp.
atom-purge
atom-purge DELETEs every entry in the given collection.
atom-post
atom-post POSTs the contents of a file or stdin to a given URL.
It doesn't do anything fancy, it's just a convenient way of getting media or an Entry created by some other tool onto the web. Eventually this will construct Entries too, but not yet.
Use Cases
Back up your blog:
atom-cp http://example.org/coll ./backup/
Restore a backup, or post several pre-created entries:
atom-cp ./backup/ http://example.org/coll
Delete spam:
atom-grep poker http://example.org/comments | atom-purge -
Plagiarise somebody else's blog:
atom-grep "popular content" http://example.org/coll | atom-cp - http://example.com/seo
Post a picture to your media collection:
atom-post -m image/png http://example.org/media icon.png
(Disclaimer: XML is a terrible format to pass down a pipe. It's awfully convenient though, and my pipes and my collections haven't been long enough for it to be a problem.)