What is Reposter?
Reposter is a tool to download any RSS feed content, transform it, and repost to any web or blog site using the standard Movabletype XMLRPC posting API.
See this post for further motivation.
Download
Download from my repository at http://svn.jaanuskase.com/reposter/trunk/. You'll need all the three files.
Installation
Just put all the three script files in the same directory. reposter.py is the main script that you'll be running.
In addition, you will need to create a new file called reposterSettings.py . Put the following info in it, substituting the correct values.
#!/usr/bin/env python
# encoding: utf-8
xmlrpc_url = 'http://www.example.com/path/to/mt-xmlrpc.cgi'
username = 'your-username'
api_password = 'your-api-password'
blogid = 10 # or whatever your numeric blog ID is
datafile = '/path/to/reposter.dat'
titleTimeFormatString = "%Y-%m-%d" # edit as you wish
timezone = "Europe/Luxembourg" # or wherever you are
feeds = {
'Google reader shared items': 'http://www.google.com/reader/public/atom/user/12043674643414749751/state/com.google/broadcast',
'del.icio.us links': 'http://del.icio.us/rss/terminuz',
'Twitter friends timeline': 'http://user:password@twitter.com/statuses/friends_timeline.atom',
}
Reposter automatically creates the file you specify with the datafile setting. This is important, as it stores the GUID-s of the posts already posted. Make sure that Reposter can write to this file, or you'll be creating duplicates.
In the "feeds" block, put the names and URL-s of the feeds that you want to scrape and repost. I've left my own Google Reader, del.icio.us and Twitter feeds as examples. In Twitter, put your own username and password. These can be in any order and you can of course have more from any RSS-compliant system that Reposter can access.
Example
See http://miscrandom.com for an example of a site that's being built almost exclusively by Reposter. You could call it my meta-blog, as I automatically pull things from Google Reader and del.icio.us, as well as my Twitter friends feed with pictures.
Disclaimer
Use at your own risk. I'm not responsible if it breaks anything. And some of the code is ugly, I know. I wanted to get this out sooner rather than later.
References and credits
I have used the following great pieces of code to put this together.
http://scott.yang.id.au/2002/12/mtsendpy/ - Movabletype XMLRPC posting code. The bulk of the lines of code in Reposter is taken up by this, but I didn't want to mess with it too much. It could be made much nicer and shorter for Reposter's purposes.
http://www.feedparser.org/ - the best feed parser for Python.
http://developer.yahoo.com/python/python-caching.html - ultra-simple but working and fine disk-caching URL content fetcher.
Contact
Write me - JaanusKase - with any comments, shouts, questions or concerns about Reposter.
