From 38de96a1ad135d9402f2c5aaa9e0af0a094c33ff Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 17 Jun 2011 10:52:20 -0600 Subject: [PATCH] Christian Post, Down To Earth and Words Without Borders by sexymax15 --- recipes/christian_post.recipe | 37 ++++++++++++++++++++++++++++ recipes/down_to_earth.recipe | 18 ++++++++++++++ recipes/mail_and_guardian.recipe | 2 +- recipes/words_without_borders.recipe | 25 +++++++++++++++++++ src/calibre/utils/localization.py | 1 + 5 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 recipes/christian_post.recipe create mode 100644 recipes/down_to_earth.recipe create mode 100644 recipes/words_without_borders.recipe diff --git a/recipes/christian_post.recipe b/recipes/christian_post.recipe new file mode 100644 index 0000000000..7bb08e88dc --- /dev/null +++ b/recipes/christian_post.recipe @@ -0,0 +1,37 @@ +#created by sexymax15 ....sexymax15@gmail.com +#christian post recipe +from calibre.web.feeds.news import BasicNewsRecipe + +class ChristianPost(BasicNewsRecipe): + + title = 'The Christian Post' + __author__ = 'sexymax15' + description = 'Homepage' + language = 'en' + no_stylesheets = True + use_embedded_content = False + oldest_article = 30 + max_articles_per_feed = 15 + + remove_empty_feeds = True + no_stylesheets = True + remove_javascript = True + + extra_css = ''' + h1 {color:#008852;font-family:Arial,Helvetica,sans-serif; font-size:20px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold; line-height:18px;} + h2 {color:#4D4D4D;font-family:Arial,Helvetica,sans-serif; font-size:16px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold; line-height:16px; } ''' + + + feeds = [ + ('Homepage', 'http://www.christianpost.com/services/rss/feed/'), + ('Most Popular', 'http://www.christianpost.com/services/rss/feed/most-popular'), + ('Entertainment', 'http://www.christianpost.com/services/rss/feed/entertainment/'), + ('Politics', 'http://www.christianpost.com/services/rss/feed/politics/'), + ('Living', 'http://www.christianpost.com/services/rss/feed/living/'), + ('Business', 'http://www.christianpost.com/services/rss/feed/business/'), + ('Opinion', 'http://www.christianpost.com/services/rss/feed/opinion/') + ] + + def print_version(self, url): + return url +'print.html' + diff --git a/recipes/down_to_earth.recipe b/recipes/down_to_earth.recipe new file mode 100644 index 0000000000..bc37514d3e --- /dev/null +++ b/recipes/down_to_earth.recipe @@ -0,0 +1,18 @@ +from calibre.web.feeds.recipes import BasicNewsRecipe + +class AdvancedUserRecipe1307834113(BasicNewsRecipe): + + title = u'Down To Earth' + oldest_article = 300 + __author__ = 'sexymax15' + max_articles_per_feed = 30 + no_stylesheets = True + remove_javascript = True + remove_attributes = ['width','height'] + use_embedded_content = False + language = 'en_IN' + remove_empty_feeds = True + remove_tags_before = dict(name='div', id='PageContent') + remove_tags_after = [dict(name='div'),{'class':'box'}] + remove_tags =[{'class':'box'}] + feeds = [(u'editor', u'http://www.downtoearth.org.in/taxonomy/term/20348/0/feed'), (u'cover story', u'http://www.downtoearth.org.in/taxonomy/term/20345/0/feed'), (u'special report', u'http://www.downtoearth.org.in/taxonomy/term/20384/0/feed'), (u'features', u'http://www.downtoearth.org.in/taxonomy/term/20350/0/feed'), (u'news', u'http://www.downtoearth.org.in/taxonomy/term/20366/0/feed'), (u'debate', u'http://www.downtoearth.org.in/taxonomy/term/20347/0/feed'), (u'natural disasters', u'http://www.downtoearth.org.in/taxonomy/term/20822/0/feed')] diff --git a/recipes/mail_and_guardian.recipe b/recipes/mail_and_guardian.recipe index 5b58f3f938..ddfce97765 100644 --- a/recipes/mail_and_guardian.recipe +++ b/recipes/mail_and_guardian.recipe @@ -3,7 +3,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class AdvancedUserRecipe1295081935(BasicNewsRecipe): title = u'Mail & Guardian ZA News' __author__ = '77ja65' - language = 'en' + language = 'en_ZA' oldest_article = 7 max_articles_per_feed = 30 no_stylesheets = True diff --git a/recipes/words_without_borders.recipe b/recipes/words_without_borders.recipe new file mode 100644 index 0000000000..7f51f9cb6b --- /dev/null +++ b/recipes/words_without_borders.recipe @@ -0,0 +1,25 @@ +#recipe created by sexymax15.....sexymax15@gmail.com +#Words without Borders recipe + +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1308302002(BasicNewsRecipe): + title = u'Words Without Borders' + language = 'en' + __author__ = 'sexymax15' + oldest_article = 90 + max_articles_per_feed = 30 + use_embedded_content = False + + remove_empty_feeds = True + no_stylesheets = True + remove_javascript = True + keep_only_tags = {'class':'span-14 article'} + remove_tags_after = [{'class':'addthis_toolbox addthis_default_style no_print'}] + remove_tags = [{'class':['posterous_quote_citation','button']}] + extra_css = """ + h1{font-family: Georgia,serif; font-size: large}h2{font-family: Georgia,serif; font-size: large} """ + + + + feeds = [(u'wwb', u'http://feeds.feedburner.com/wwborders?format=xml')] diff --git a/src/calibre/utils/localization.py b/src/calibre/utils/localization.py index a8285ad5a2..f14858c3b6 100644 --- a/src/calibre/utils/localization.py +++ b/src/calibre/utils/localization.py @@ -121,6 +121,7 @@ _extra_lang_codes = { 'en_YE' : _('English (Yemen)'), 'en_IE' : _('English (Ireland)'), 'en_CN' : _('English (China)'), + 'en_ZA' : _('English (South Africa)'), 'es_PY' : _('Spanish (Paraguay)'), 'es_UY' : _('Spanish (Uruguay)'), 'es_AR' : _('Spanish (Argentina)'),