I love my Kindle. And I love the Calibre eBook management software. If you haven’t had a chance to check out Calibre, you’re missing out – it’s kinda like an iTunes for your eBook collection. In addition to storing, converting, updating, and categorizing your eBook collection, the software will also download news from any website, and will format that news for proper viewing on your Kindle or other eBook reader.

Calibre comes stocked with “recipes” for downloading news from hundreds of websites. Unfortunately, the Minneapolis Star Tribune is not one of them. So I wrote my own.

Here is my very simple recipe for the Star Tribune. It omits many of the newspaper sections that I am not interested in, so you may want to edit my list of sources using this list of RSS feeds as your guide. It’s written in Python, so spacing is important.

Calibre recipe for the Minneapolis Star Tribune

class AdvancedUserRecipe1266267637(BasicNewsRecipe):
    title          = u'Star Tribune'
    oldest_article = 7
    max_articles_per_feed = 100

    feeds          = [(u'Main', u'http://www.startribune.com/rss/?sf=1&s=/'), (u'Local', u'http://www.startribune.com/local/index.rss2'), (u'Minneapolis', u'http://www.startribune.com/local/minneapolis/index.rss2'), (u'St. Paul', u'http://www.startribune.com/local/stpaul/index.rss2'), (u'North Metro', u'http://www.startribune.com/local/north/index.rss2'), (u'East Metro', u'http://www.startribune.com/local/east/index.rss2'), (u'South Metro', u'http://www.startribune.com/local/south/index.rss2'), (u'West Metro', u'http://www.startribune.com/local/west/index.rss2'), (u'Business', u'http://www.startribune.com/business/index.rss2'), (u'Science & Technology', u'http://www.startribune.com/science/index.rss2'), (u'Sports', u'http://www.startribune.com/sports/index.rss2'), (u'Lifestyle', u'http://www.startribune.com/lifestyle/index.rss2'), (u'Travel', u'http://www.startribune.com/lifestyle/travel/index.rss2'), (u'Books', u'http://www.startribune.com/entertainment/books/index.rss2'), (u'Entertainment', u'http://www.startribune.com/entertainment/index.rss2'), (u'Commentary', u'http://www.startribune.com/opinion/commentary/index.rss2'), (u'Editorials', u'http://www.startribune.com/opinion/editorials/index.rss2')]

    def print_version(self, url):
        parts=url.split('/')
        id = parts[4].split('.')
        if not id[0].isdigit():
            id = parts[5].split('.')

        return url.replace(url, 'http://www.startribune.com/templates/Print_This_Story?sid=' + id[0])

I’ve also contributed this code to the wiki repository for user-created recipes.

There is a small bug – I’ve noticed that some stories in the Sports section use some sort of Redirect to steer users to a blog entry. Because of the way the Star Tribune people are doing this redirect, the recipe doesn’t work on those stories. It’s only a very few stories, though, and I’m fine with it, so I’m not going to spend time tweaking the recipe.