diff --git a/src/calibre/gui2/images/news/starbulletin.png b/src/calibre/gui2/images/news/starbulletin.png new file mode 100644 index 0000000000..bb3afd636a Binary files /dev/null and b/src/calibre/gui2/images/news/starbulletin.png differ diff --git a/src/calibre/web/feeds/recipes/__init__.py b/src/calibre/web/feeds/recipes/__init__.py index 0a05d9b270..161666d45d 100644 --- a/src/calibre/web/feeds/recipes/__init__.py +++ b/src/calibre/web/feeds/recipes/__init__.py @@ -26,7 +26,8 @@ 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', 'the_oz', 'exiled', + 'jb_online', 'estadao', 'o_globo', 'vijesti', 'elmundo', 'the_oz', + 'honoluluadvertiser', 'starbulletin', 'exiled', )] import re, imp, inspect, time, os diff --git a/src/calibre/web/feeds/recipes/recipe_blic.py b/src/calibre/web/feeds/recipes/recipe_blic.py index bee95b8424..33f98f562e 100644 --- a/src/calibre/web/feeds/recipes/recipe_blic.py +++ b/src/calibre/web/feeds/recipes/recipe_blic.py @@ -13,6 +13,7 @@ class Blic(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'Blic.rs online verzija najtiraznije novine u Srbiji donosi najnovije vesti iz Srbije i sveta, komentare, politicke analize, poslovne i ekonomske vesti, vesti iz regiona, intervjue, informacije iz kulture, reportaze, pokriva sve sportske dogadjaje, detaljan tv program, nagradne igre, zabavu, fenomenalni Blic strip, dnevni horoskop, arhivu svih dogadjaja' oldest_article = 7 + language = _('Serbian') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_danas.py b/src/calibre/web/feeds/recipes/recipe_danas.py index 54f75b8ad2..59e99fc746 100644 --- a/src/calibre/web/feeds/recipes/recipe_danas.py +++ b/src/calibre/web/feeds/recipes/recipe_danas.py @@ -13,6 +13,7 @@ class Danas(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'Dnevne novine sa vestima iz sveta, politike, ekonomije, kulture, sporta, Beograda, Novog Sada i cele Srbije.' oldest_article = 2 + language = _('Serbian') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_de_standaard.py b/src/calibre/web/feeds/recipes/recipe_de_standaard.py index f247c14d5c..de456b9169 100644 --- a/src/calibre/web/feeds/recipes/recipe_de_standaard.py +++ b/src/calibre/web/feeds/recipes/recipe_de_standaard.py @@ -9,7 +9,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class DeStandaard(BasicNewsRecipe): title = u'De Standaard' __author__ = u'Darko Miletic' - language = _('French') + language = _('Dutch') description = u'News from Belgium' oldest_article = 7 max_articles_per_feed = 100 diff --git a/src/calibre/web/feeds/recipes/recipe_demorgen_be.py b/src/calibre/web/feeds/recipes/recipe_demorgen_be.py index 8de95bd4aa..5dc912aa3e 100644 --- a/src/calibre/web/feeds/recipes/recipe_demorgen_be.py +++ b/src/calibre/web/feeds/recipes/recipe_demorgen_be.py @@ -13,6 +13,7 @@ class DeMorganBe(BasicNewsRecipe): __author__ = u'Darko Miletic' description = u'News from Belgium' oldest_article = 7 + language = _('Dutch') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_estadao.py b/src/calibre/web/feeds/recipes/recipe_estadao.py index 97fcea4b8a..f44e62e0ca 100644 --- a/src/calibre/web/feeds/recipes/recipe_estadao.py +++ b/src/calibre/web/feeds/recipes/recipe_estadao.py @@ -13,7 +13,7 @@ class Estadao(BasicNewsRecipe): title = 'O Estado de S. Paulo' __author__ = 'Darko Miletic' description = 'News from Brasil' - language = _('Spanish') + language = _('Portugese') oldest_article = 2 max_articles_per_feed = 100 no_stylesheets = True diff --git a/src/calibre/web/feeds/recipes/recipe_honoluluadvertiser.py b/src/calibre/web/feeds/recipes/recipe_honoluluadvertiser.py new file mode 100644 index 0000000000..ef36a700ed --- /dev/null +++ b/src/calibre/web/feeds/recipes/recipe_honoluluadvertiser.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = '2009, Darko Miletic ' +''' +honoluluadvertiser.com +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class Honoluluadvertiser(BasicNewsRecipe): + title = 'Honolulu Advertiser' + __author__ = 'Darko Miletic' + description = "Latest national and local Hawaii sports news from The Honolulu Advertiser." + publisher = 'Honolulu Advertiser' + category = 'news, Honolulu, Hawaii' + oldest_article = 2 + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + encoding = 'cp1252' + remove_javascript = True + cover_url = 'http://www.honoluluadvertiser.com/graphics/branding.gif' + + html2lrf_options = [ + '--comment' , description + , '--category' , category + , '--publisher' , publisher + ] + + html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"' + + keep_only_tags = [dict(name='td')] + + remove_tags = [dict(name=['object','link'])] + + + feeds = [ + (u'Breaking news', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS01&MIME=XML' ) + ,(u'Local news', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS02&MIME=XML' ) + ,(u'Sports', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS03&MIME=XML' ) + ,(u'Island life', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS05&MIME=XML' ) + ,(u'Entertainment', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS06&MIME=XML' ) + ,(u'Business', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS04&MIME=XML' ) + ] + + def preprocess_html(self, soup): + for item in soup.findAll(style=True): + del item['style'] + mtag = '\n\n' + soup.head.insert(0,mtag) + return soup + + def print_version(self, url): + ubody, sep, rest = url.rpartition('/-1/') + root, sep2, article_id = ubody.partition('/article/') + return u'http://www.honoluluadvertiser.com/apps/pbcs.dll/article?AID=/' + article_id + '&template=printart' + diff --git a/src/calibre/web/feeds/recipes/recipe_jb_online.py b/src/calibre/web/feeds/recipes/recipe_jb_online.py index c94ab25f05..2b40f1960d 100644 --- a/src/calibre/web/feeds/recipes/recipe_jb_online.py +++ b/src/calibre/web/feeds/recipes/recipe_jb_online.py @@ -13,7 +13,7 @@ class JBOnline(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'News from Brasil' oldest_article = 2 - language = _('Spanish') + language = _('Portugese') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_nin.py b/src/calibre/web/feeds/recipes/recipe_nin.py index 65195b5616..bc62af1b4f 100644 --- a/src/calibre/web/feeds/recipes/recipe_nin.py +++ b/src/calibre/web/feeds/recipes/recipe_nin.py @@ -15,6 +15,7 @@ class Nin(BasicNewsRecipe): description = 'Nedeljne informativne novine' no_stylesheets = True oldest_article = 15 + language = _('Serbian') simultaneous_downloads = 1 delay = 1 encoding = 'utf8' diff --git a/src/calibre/web/feeds/recipes/recipe_novosti.py b/src/calibre/web/feeds/recipes/recipe_novosti.py index 4ff225fd0a..2fefc8a566 100644 --- a/src/calibre/web/feeds/recipes/recipe_novosti.py +++ b/src/calibre/web/feeds/recipes/recipe_novosti.py @@ -13,6 +13,7 @@ class Novosti(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'novosti, vesti, politika, dosije, drustvo, ekonomija, hronika, reportaze, svet, kultura, sport, beograd, regioni, mozaik, feljton, intrvju, pjer, fudbal, kosarka, podvig, arhiva, komentari, kolumne, srbija, republika srpska,Vecernje novosti' oldest_article = 2 + language = _('Serbian') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_o_globo.py b/src/calibre/web/feeds/recipes/recipe_o_globo.py index 1331ea86a3..83e7f2da93 100644 --- a/src/calibre/web/feeds/recipes/recipe_o_globo.py +++ b/src/calibre/web/feeds/recipes/recipe_o_globo.py @@ -14,7 +14,7 @@ class OGlobo(BasicNewsRecipe): description = 'News from Brasil' oldest_article = 2 max_articles_per_feed = 100 - language = _('Spanish') + language = _('Portugese') no_stylesheets = True use_embedded_content = False encoding = 'cp1252' diff --git a/src/calibre/web/feeds/recipes/recipe_pescanik.py b/src/calibre/web/feeds/recipes/recipe_pescanik.py index 04d7d88803..48d6a90966 100644 --- a/src/calibre/web/feeds/recipes/recipe_pescanik.py +++ b/src/calibre/web/feeds/recipes/recipe_pescanik.py @@ -14,6 +14,7 @@ class Pescanik(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'Pescanik' oldest_article = 7 + language = _('Serbian') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_st_petersburg_times.py b/src/calibre/web/feeds/recipes/recipe_st_petersburg_times.py index 7de4efa80e..8c22262904 100644 --- a/src/calibre/web/feeds/recipes/recipe_st_petersburg_times.py +++ b/src/calibre/web/feeds/recipes/recipe_st_petersburg_times.py @@ -17,7 +17,7 @@ class PetersburgTimes(BasicNewsRecipe): max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False - language = _('Russian') + language = _('English') INDEX = 'http://www.sptimes.ru' def parse_index(self): @@ -36,4 +36,4 @@ class PetersburgTimes(BasicNewsRecipe): 'url':url, 'description':description }) - return [(soup.head.title.string, articles)] \ No newline at end of file + return [(soup.head.title.string, articles)] diff --git a/src/calibre/web/feeds/recipes/recipe_starbulletin.py b/src/calibre/web/feeds/recipes/recipe_starbulletin.py new file mode 100644 index 0000000000..db99ebcec7 --- /dev/null +++ b/src/calibre/web/feeds/recipes/recipe_starbulletin.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = '2009, Darko Miletic ' +''' +starbulletin.com +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class Starbulletin(BasicNewsRecipe): + title = 'Honolulu Star-Bulletin' + __author__ = 'Darko Miletic' + description = "Latest national and local Hawaii sports news" + publisher = 'Honolulu Star-Bulletin' + category = 'news, Honolulu, Hawaii' + oldest_article = 2 + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + encoding = 'utf8' + remove_javascript = True + cover_url = 'http://media.starbulletin.com/designimages/spacer.gif' + + html2lrf_options = [ + '--comment' , description + , '--category' , category + , '--publisher' , publisher + ] + + html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"' + + keep_only_tags = [ dict(name='div', attrs={'id':'storyColoumn'}) ] + + remove_tags = [ + dict(name=['object','link']) + ,dict(name='span', attrs={'id':'printdesc'}) + ,dict(name='div' , attrs={'class':'lightGreyBox storyTools clearAll'}) + ,dict(name='div' , attrs={'id':'breadcrumbs'}) + ] + + feeds = [ + (u'Headlines', u'http://www.starbulletin.com/starbulletin_headlines.rss' ) + ,(u'News', u'http://www.starbulletin.com/news/index.rss' ) + ,(u'Sports', u'http://www.starbulletin.com/sports/index.rss' ) + ,(u'Features', u'http://www.starbulletin.com/features/index.rss' ) + ,(u'Editorials', u'http://www.starbulletin.com/editorials/index.rss' ) + ,(u'Business', u'http://www.starbulletin.com/business/index.rss' ) + ,(u'Travel', u'http://www.starbulletin.com/travel/index.rss' ) + ] + + def preprocess_html(self, soup): + for item in soup.findAll(style=True): + del item['style'] + mtag = '\n\n' + soup.head.insert(0,mtag) + return soup + diff --git a/src/calibre/web/feeds/recipes/recipe_vijesti.py b/src/calibre/web/feeds/recipes/recipe_vijesti.py index beb6f64f65..e018e91b02 100644 --- a/src/calibre/web/feeds/recipes/recipe_vijesti.py +++ b/src/calibre/web/feeds/recipes/recipe_vijesti.py @@ -16,6 +16,7 @@ class Vijesti(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'News from Montenegro' oldest_article = 2 + language = _('Serbian') max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False diff --git a/src/calibre/web/feeds/recipes/recipe_vreme.py b/src/calibre/web/feeds/recipes/recipe_vreme.py index daee3ba3f7..3f0f8b735f 100644 --- a/src/calibre/web/feeds/recipes/recipe_vreme.py +++ b/src/calibre/web/feeds/recipes/recipe_vreme.py @@ -16,6 +16,7 @@ class Vreme(BasicNewsRecipe): __author__ = 'Darko Miletic' description = 'Politicki Nedeljnik Srbije' no_stylesheets = True + language = _('Serbian') needs_subscription = True INDEX = 'http://www.vreme.com' LOGIN = 'http://www.vreme.com/account/index.php'