From 6c3100ffaa23d79814a8b4d845b285c3a5fcfd44 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 21 May 2009 13:06:09 -0700 Subject: [PATCH] New recipe for PHD Cmics by Rafardeon --- src/calibre/web/feeds/recipes/__init__.py | 2 +- .../web/feeds/recipes/recipe_phd_comics.py | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/calibre/web/feeds/recipes/recipe_phd_comics.py diff --git a/src/calibre/web/feeds/recipes/__init__.py b/src/calibre/web/feeds/recipes/__init__.py index 639878b37f..5f78801493 100644 --- a/src/calibre/web/feeds/recipes/__init__.py +++ b/src/calibre/web/feeds/recipes/__init__.py @@ -43,7 +43,7 @@ recipe_modules = ['recipe_' + r for r in ( 'seattle_times', 'scott_hanselman', 'coding_horror', 'twitchfilms', 'stackoverflow', 'telepolis_artikel', 'zaobao', 'usnews', 'straitstimes', 'index_hu', 'pcworld_hu', 'hrt', 'rts', - 'h1', 'h2', 'h3', + 'h1', 'h2', 'h3', 'phd_comics', )] import re, imp, inspect, time, os diff --git a/src/calibre/web/feeds/recipes/recipe_phd_comics.py b/src/calibre/web/feeds/recipes/recipe_phd_comics.py new file mode 100644 index 0000000000..4bf8772064 --- /dev/null +++ b/src/calibre/web/feeds/recipes/recipe_phd_comics.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai +from __future__ import with_statement + +__license__ = 'GPL v3' +__copyright__ = '2009, Kovid Goyal ' +__docformat__ = 'restructuredtext en' + + +from calibre.web.feeds.news import BasicNewsRecipe + +class PHDComics(BasicNewsRecipe): + title = u'PHD Comics' + oldest_article = 14 + max_articles_per_feed = 100 + language = _('English') + __author__ = 'Rafardeon' + + feeds = [(u'PHD Comics', u'http://www.phdcomics.com/gradfeed.php')] + + def print_version(self, url): + return url.replace('http://www.phdcomics.com/comics.php?f=', 'http://www.phdcomics.com/comics/archive_print.php?comicid=')