So I got a Sony Touch eReader, and that means I not only need books, but I want some of my favorite feeds in there.
After playing with Calibre it seems to have a lot of very cool functions, and I though I share my recipies in here.
Eurogamer – Reviews
The only real challenge, the rest is more basic. This fetches the review feed, then guts out everything unrelated to the review and fetches the other pages.
Eurogamer.recipe
class EuroGamerReviewsRecipe(BasicNewsRecipe):
title = u'Eurogamer.net Reviews'
oldest_article = 7
max_articles_per_feed = 25
recursions = 1
use_embedded_content = False
no_stylesheets = 1
cover_url = u"http://www.frictionalgames.com/images/news/200704eurogamer.jpg"
match_regexps = [r'page=[0-9]+']
feeds = [(None, u'http://www.eurogamer.net/rss/eurogamer_review_feed.rss')]
keep_only_tags = [dict(id='article-title'),dict(name='div',attrs={'class':["copy"]})]
Roleplaying Tips
Nothing major, mostly removing the stylesheet to avoid a dark background. Also removed the advertisements, I’m not against that but after conversion they look like regular articles and I can’t act on them from the eReader. To make it up to Johnn Four I bought his book GM Mastery: NPC Essentials.
Roleplayingtips.recipe
class RolePlayingTipsRecipe(BasicNewsRecipe):
title = u'Roleplaying Tips'
oldest_article = 28
max_articles_per_feed = 10
recursions = 0
use_embedded_content = False
no_stylesheets = 1
cover_url = u"http://www.roleplayingtips.com/images/rpt_logo_onblue_notxt_120x132.gif"
feeds = [(None, u'http://feeds.feedburner.com/roleplayingtips')]
keep_only_tags = [dict(id='divMain')]
remove_tags = [dict(name='div',attrs={'class':["ad_block_colored"]})]
Conclusion
Writing a calibre Recipe is easy, and makes an eReader more usefull