From b7085bc8da673a5614cb06b5595dbf52c71a119f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 3 Feb 2009 13:45:20 -0800 Subject: [PATCH] New recipe for The Australian by MAtthew Briggs --- src/calibre/gui2/images/news/the_oz.png | Bin 0 -> 701 bytes src/calibre/web/feeds/recipes/__init__.py | 2 +- .../web/feeds/recipes/recipe_the_oz.py | 53 ++++++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 src/calibre/gui2/images/news/the_oz.png create mode 100644 src/calibre/web/feeds/recipes/recipe_the_oz.py diff --git a/src/calibre/gui2/images/news/the_oz.png b/src/calibre/gui2/images/news/the_oz.png new file mode 100644 index 0000000000000000000000000000000000000000..93f68f962648a04ac82d9bf61acc11dc59f7ee51 GIT binary patch literal 701 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zK-vS0-A-oPfdtD69Mgd`SU*F|v9*U87#N>c zw5E>MV|=VHm4aN_#Y)~hVxQQxqoZ4)qxm1>)yU~VEbQzD4|c8PPzqzW4^mu^(BAQ2 z!k5D)y}tKU-v2H+kv%Iz>to~Tr*?CmTRxvxe8E1T>a*9mOX8KYSv`X+r%u^DFS~2w zmZl@?XI6{o%~zXm(YkvU>w-^7V&;3Vh)Dejp1pt4f=@4P-`(O`wxdb&_=js|3;Dge z>h&X2cMpn9I3P?!9n zKNdGu1}wO;NZR_q>d-`YKcU_B-I4e5m&D%ED^>sTRQZ3T;f;-+Yb51X7VbZ~ZvN8D zH4aM;uHf3_l>dC=?&b3nf3t0Kl?&K9%!%caR&Dw&@j_SD7gRWYCaGkb3L&eEml zWWv?@rnLu{^%=1rD%!V9)pLb!%6YlqG=Wrhrc-n0ulfAdHH&@f`}-UMN4|Z(YI%E| zgv097Id}HmJo0xsqpfX9)$iFWbkC%kn+Z)}Is=S;)e_f;lH{V)#FA9q6d=K1WME*a zYha{nU>ss(Xk}t#WooHyU|?lnpwhM47N#LLKP5A*l7NP4>${vl4Gf;HelF{r5}E+x C)F&_i literal 0 HcmV?d00001 diff --git a/src/calibre/web/feeds/recipes/__init__.py b/src/calibre/web/feeds/recipes/__init__.py index 8fd6badc62..14cbbfb634 100644 --- a/src/calibre/web/feeds/recipes/__init__.py +++ b/src/calibre/web/feeds/recipes/__init__.py @@ -26,7 +26,7 @@ recipe_modules = ['recipe_' + r for r in ( 'laprensa', 'amspec', 'freakonomics', 'criticadigital', 'elcronista', 'shacknews', 'teleread', 'granma', 'juventudrebelde', 'juventudrebelde_english', 'la_tercera', 'el_mercurio_chile', 'la_cuarta', 'lanacion_chile', 'la_segunda', - 'jb_online', 'estadao', 'o_globo', 'vijesti', 'elmundo', + 'jb_online', 'estadao', 'o_globo', 'vijesti', 'elmundo', 'the_oz', )] import re, imp, inspect, time, os diff --git a/src/calibre/web/feeds/recipes/recipe_the_oz.py b/src/calibre/web/feeds/recipes/recipe_the_oz.py new file mode 100644 index 0000000000..b5911b1c67 --- /dev/null +++ b/src/calibre/web/feeds/recipes/recipe_the_oz.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python +__license__ = 'GPL v3' +__copyright__ = '2009, Matthew Briggs' +__docformat__ = 'restructuredtext en' + +''' +http://www.theaustralian.news.com.au/ +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class DailyTelegraph(BasicNewsRecipe): + title = u'The Australian' + __author__ = u'Matthew Briggs' + description = u'National broadsheet newspaper from down under - colloquially known as The Oz' + oldest_article = 2 + max_articles_per_feed = 10 + remove_javascript = True + no_stylesheets = True + encoding = 'utf8' + + html2lrf_options = [ + '--comment' , description + , '--category' , 'news, Australia' + , '--publisher' , title + ] + + keep_only_tags = [ + dict(name='h1', attrs={'class':'section-heading'}) + ,dict(name='div', attrs={'id':'article'}) + ] + + remove_tags = [dict(name=['object','link'])] + + 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'), + (u'Opinion', u'http://feeds.news.com.au/public/rss/2.0/aus_opinion_58.xml'), + (u'Business', u'http://feeds.news.com.au/public/rss/2.0/aus_business_811.xml'), + (u'Media', u'http://feeds.news.com.au/public/rss/2.0/aus_media_57.xml'), + (u'Higher Education', u'http://feeds.news.com.au/public/rss/2.0/aus_higher_education_56.xml'), + (u'The Arts', u'http://feeds.news.com.au/public/rss/2.0/aus_arts_51.xml'), + (u'Commercial Property', u'http://feeds.news.com.au/public/rss/2.0/aus_business_commercial_property_708.xml'), + (u'The Nation', u'http://feeds.news.com.au/public/rss/2.0/aus_the_nation_62.xml'), + (u'Sport', u'http://feeds.news.com.au/public/rss/2.0/aus_sport_61.xml'), + (u'Travel', u'http://feeds.news.com.au/public/rss/2.0/aus_travel_and_indulgence_63.xml'), + (u'Defence', u'http://feeds.news.com.au/public/rss/2.0/aus_defence_54.xml'), + (u'Aviation', u'http://feeds.news.com.au/public/rss/2.0/aus_business_aviation_706.xml'), + (u'Mining', u'http://feeds.news.com.au/public/rss/2.0/aus_business_mining_704.xml'), + (u'Climate', u'http://feeds.news.com.au/public/rss/2.0/aus_climate_809.xml'), + (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') + ]