From cc92acadb88f44f8c45b7fd8a42f8ff9ef3eab5b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 22 Oct 2009 17:21:35 -0600 Subject: [PATCH] Improved recipe for The Australian --- resources/recipes/the_oz.recipe | 23 ++++++++++++++++++++++- src/calibre/translations/calibre.pot | 6 +++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/resources/recipes/the_oz.recipe b/resources/recipes/the_oz.recipe index 6455a69a20..b2c0a412fc 100644 --- a/resources/recipes/the_oz.recipe +++ b/resources/recipes/the_oz.recipe @@ -11,7 +11,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class DailyTelegraph(BasicNewsRecipe): title = u'The Australian' - __author__ = u'Matthew Briggs' + __author__ = u'Matthew Briggs and Sujata Raman' description = u'National broadsheet newspaper from down under - colloquially known as The Oz' language = 'en_AU' @@ -34,6 +34,15 @@ class DailyTelegraph(BasicNewsRecipe): remove_tags = [dict(name=['object','link'])] + extra_css = ''' + h1{font-family :Georgia,"Times New Roman",Times,serif; font-size:large; } + #article{font-family :Georgia,"Times New Roman",Times,serif; font-size: x-small;} + .module-subheader{font-family :Tahoma,Geneva,Arial,Helvetica,sans-serif; color:#666666; font-size: xx-small;} + .intro{ font-family:Trebuchet MS,Trebuchet,Helvetica,sans-serif;font-size: x-small; } + .article-source{font-family:Trebuchet MS,Trebuchet,Helvetica,sans-serif; color:#666666; font-size: xx-small;} + .caption{font-family:Trebuchet MS,Trebuchet,Helvetica,sans-serif; font-size: xx-small;} + ''' + feeds = [ (u'News', u'http://feeds.news.com.au/public/rss/2.0/aus_news_807.xml'), (u'World News', u'http://feeds.news.com.au/public/rss/2.0/aus_world_808.xml'), @@ -53,3 +62,15 @@ class DailyTelegraph(BasicNewsRecipe): (u'Property', u'http://feeds.news.com.au/public/rss/2.0/aus_property_59.xml'), (u'US Election', u'http://feeds.news.com.au/public/rss/2.0/aus_uselection_687.xml') ] + + def get_cover_url(self): + + href = 'http://www.theaustralian.news.com.au/' + + soup = self.index_to_soup(href) + img = soup.find('img',alt ="Digital editions of The Australian") + print img + if img : + cover_url = img['src'] + + return cover_url diff --git a/src/calibre/translations/calibre.pot b/src/calibre/translations/calibre.pot index 20fd3fe3fb..d1e6a9d9a2 100644 --- a/src/calibre/translations/calibre.pot +++ b/src/calibre/translations/calibre.pot @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: calibre 0.6.19\n" -"POT-Creation-Date: 2009-10-20 18:49+MDT\n" -"PO-Revision-Date: 2009-10-20 18:49+MDT\n" +"POT-Creation-Date: 2009-10-22 17:20+MDT\n" +"PO-Revision-Date: 2009-10-22 17:20+MDT\n" "Last-Translator: Automatically generated\n" "Language-Team: LANGUAGE\n" "MIME-Version: 1.0\n" @@ -1831,7 +1831,7 @@ msgid "Specify the character encoding of the output document. The default is utf msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/tcr/output.py:27 -msgid "Speciy the compression level to use. Scale 1 - 10. 1 being the lowest compression but the fastest and 10 being the highest compression but the slowest." +msgid "Specify the compression level to use. Scale 1 - 10. 1 being the lowest compression but the fastest and 10 being the highest compression but the slowest." msgstr "" #: /home/kovid/work/calibre/src/calibre/ebooks/txt/input.py:32