Update: For the latest version and up to date documentation, please see the project page.
feed2omb is a simple tool that takes input from Atom or RSS feeds and posts updates to the open microblogging service of your choice. It should also (though I’m not going to try it) quite happily post to Twitter.
The feed reading is handled by Mark Pilgrim’s excellent Universal Feed Parser so it should be able to deal with any feed you throw at it. On the posting side, you can send the updates to open microblogging services such as those based on Laconica – this includes Identica.
You should be able to run this on any operating system where you can install Python (tested with 2.5). In addition to feed2omb itself, you need the Universal Feed Parser and ConfigObj. Both dependencies can either be installed properly or just placed in the same directory as feed2omb.
Create one or more config files (one for each feed) using the sample.config file as an example.
Run feed2omb.py --update --test yours.config to check everything is working. This will not post anything, but just output the new messages it finds. If everything looks good, you can run again with the –test option and schedule this to run on a regular basis.
You can specify as many config files as you need – each will be processed in turn. For help on the command line, use feed2omb.py --help.
Instead of --update, you can specify --eat. In this case, new messages found will be marked as sent, but will not actually be sent. This is useful when setting up a new feed, to prevent the sending of lots of old items.
The --max restricts processing to a specified number of items per run. For example, specify --max=1 to only process one item. When set up this way, even if there are multiple new items in the feed, only one (the oldest) will be processed on each run. This can be used to avoid flooding the omb service with a batch of messages all at once.
Q: Now twitterfeed.com supports Laconica, why not just use that or something like it?
A: That would be easier, but: a) you have to give it your account details, b) it’s not ‘open’ and you can’t customise it, and c) you might be running a private Laconica instance on a non-public network.
Q: Where’s the source code?
A: In the zipped download (see above), or you can browse the git repository or clone it using git from there – e.g.:
git clone http://git.ciarang.com/feed2omb.git
Q: What license is this released under?
A: AGPL v3
Q: Can it output the author’s name along with the entry’s title?
A: Yes, version 0.5 adds a ‘msgmode’ setting to the config file. With this set to ‘title’ (the default) just the entry’s title is sent. Setting it to ‘authtitle’ sends the author’s name followed by the title – this is useful for feeds with multiple authors, or aggregated feeds such as those sourced from a Planet installation.
Q: Why isn’t my question answered here?
A: You haven’t asked it yet. Ask me.
Comments are now closed.