From 5962e7f641bbec5871a4066c21fcdc30d5f34f2a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 16 Jul 2009 14:45:36 -0600 Subject: [PATCH 1/2] Fixed recipe for The Washington Post --- src/calibre/web/feeds/recipes/recipe_wash_post.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/calibre/web/feeds/recipes/recipe_wash_post.py b/src/calibre/web/feeds/recipes/recipe_wash_post.py index 2140217a03..44e8458ec6 100644 --- a/src/calibre/web/feeds/recipes/recipe_wash_post.py +++ b/src/calibre/web/feeds/recipes/recipe_wash_post.py @@ -6,16 +6,21 @@ class WashingtonPost(BasicNewsRecipe): title = 'Washington Post' description = 'US political news' - __author__ = 'Kovid Goyal' + __author__ = 'Kovid Goyal and Sujata Raman' use_embedded_content = False max_articles_per_feed = 20 language = _('English') - remove_javascript = True + no_stylesheets = True + extra_css = ''' + #articleCopyright { font-family:Arial,helvetica,sans-serif ; font-weight:bold ; font-size:x-small ;} + p { font-family:"Times New Roman",times,serif ; font-weight:normal ; font-size:small ;} + body{font-family:arial,helvetica,sans-serif} + ''' - feeds = [ ('Today\'s Highlights', 'http://www.washingtonpost.com/wp-dyn/rss/linkset/2005/03/24/LI2005032400102.xml'), + feeds = [ ('Today\'s Highlights', 'http://www.washingtonpost.com/wp-dyn/rss/linkset/2005/03/24/LI2005032400102.xml'), ('Politics', 'http://www.washingtonpost.com/wp-dyn/rss/politics/index.xml'), ('Nation', 'http://www.washingtonpost.com/wp-dyn/rss/nation/index.xml'), ('World', 'http://www.washingtonpost.com/wp-dyn/rss/world/index.xml'), @@ -30,7 +35,7 @@ class WashingtonPost(BasicNewsRecipe): def get_article_url(self, article): - return article.get('pheedo_origlink', article.get('link', None)) + return article.get('guid', article.get('link', None)) def print_version(self, url): return url.rpartition('.')[0] + '_pf.html' From 7f308db1d288f21dc16f6af9721e518a77653a96 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 16 Jul 2009 14:49:36 -0600 Subject: [PATCH 2/2] Fix subtle bug that would cause problems when using multiple plumbers in the same process, as happens when importing HTML files in the GUI --- src/calibre/ebooks/conversion/plumber.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/calibre/ebooks/conversion/plumber.py b/src/calibre/ebooks/conversion/plumber.py index 39170c69b5..3c49cc9423 100644 --- a/src/calibre/ebooks/conversion/plumber.py +++ b/src/calibre/ebooks/conversion/plumber.py @@ -465,6 +465,12 @@ OptionRecommendation(name='list_recipes', # Remove the options that have been disabled by recommendations from the # plugins. + for w in ('input_options', 'output_options', + 'all_format_options'): + temp = set([]) + for x in getattr(self, w): + temp.add(x.clone()) + setattr(self, w, temp) self.merge_plugin_recommendations() @classmethod