Announcing feed-push and sendxmpp-py
Polling RSS/Atom feeds wastes a lot of resources, for example "of all bandwidth generated by [The Pirate Bay] today nearly half comes from the RSS feed"[^1].
Until today I used to poll the feeds of my websites, watching for contributions on wikis and comments on my blog.
Now I receive updates instantly via XMPP thanks to these two scripts:
feed-push is a daemon that watches local RSS/Atom files for changes and executes commands when new articles appear. It is written in python2 and depends on gamin and feedparser.
sendxmpp is the XMPP equivalent of sendmail, sendxmpp-py is a python3 replacement for the old sendxmpp written in Perl.
I couldn't find a cross-platform library to watch files/directories accessible from python to use in feed-push. I fell back to gamin which only works on Linux and FreeBSD at the time I'm writing this post.
sendxmpp should be provided by the XMPP server (in my case prosody) the same way SMTP servers provide sendmail.
There is still no way for a developer to provide a cross-distribution and easy way for users to cleanly install its software, the only tool I know of that tries to solve this problem is pkg++ but it's not even close to being ready.
[^1]: Torrent-less Pirate Bay Sees Massive Drop in Bandwith