diff --git a/Changelog.yaml b/Changelog.yaml index c9ece5cfbc..f5835a0b1a 100644 --- a/Changelog.yaml +++ b/Changelog.yaml @@ -36,7 +36,7 @@ - title: "News downloads: When getting an article URL from a RSS feed, look first for an original article link. This speeds up the download of news services that use a syndication service like feedburner or pheedo to publish their RSS feeds." bug fixes: - - "Windows device detection: Don't do expensive polling while waiting for device disconnect. This should fix the problems people have with their floppy drive being activated while an e-book reader is connected" + - title: "Windows device detection: Don't do expensive polling while waiting for device disconnect. This should fix the problems people have with their floppy drive being activated while an e-book reader is connected" - title: "PML Input: Fix creation of metadata Table of Contents" tickets: [5633] @@ -84,7 +84,7 @@ author: Darko Miletic - title: Pajamas Media - autor: Krittika Goyal + author: Krittika Goyal - title: Algemeen Dagbla author: kwetal diff --git a/resources/images/news/ionline_pt.png b/resources/images/news/ionline_pt.png new file mode 100644 index 0000000000..f66d4aa797 Binary files /dev/null and b/resources/images/news/ionline_pt.png differ diff --git a/resources/images/news/nationalreviewonline.png b/resources/images/news/nationalreviewonline.png new file mode 100644 index 0000000000..9070b3c71d Binary files /dev/null and b/resources/images/news/nationalreviewonline.png differ diff --git a/resources/recipes/barrons.recipe b/resources/recipes/barrons.recipe index 8106243cc0..9d79aed728 100644 --- a/resources/recipes/barrons.recipe +++ b/resources/recipes/barrons.recipe @@ -98,6 +98,9 @@ class Barrons(BasicNewsRecipe): ('Funds/Q&A', 'http://online.barrons.com/xml/rss/3_7519.xml'), ] + def get_article_url(self, article): + return article.get('link', None) + def get_cover_url(self): cover_url = None diff --git a/resources/recipes/ionline_pt.recipe b/resources/recipes/ionline_pt.recipe new file mode 100644 index 0000000000..3fe379b0d8 --- /dev/null +++ b/resources/recipes/ionline_pt.recipe @@ -0,0 +1,58 @@ + +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +www.ionline.pt +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class IOnline_pt(BasicNewsRecipe): + title = 'ionline - Portugal' + __author__ = 'Darko Miletic' + description = 'News from Portugal' + publisher = 'ionline.pt' + category = 'ionline, noticias, portugal, jornal, actualidade, benfica, bolsa, desporto, empresas, globo, europa, futebol, internacional, investir, lisboa, jogos, musica, videos, tempo, meteorologia, pais, politica, porto, sporting, fcporto, televisao, tv, opiniao, nacional, sociedade, crise, financeira, policia, crime, artes, cinema, cultura, madeleine, blog, ciencia, tecnologia, galerias, fotografia, fotos, famosos, emprego, imagens, teatro, news, mundial, governo, ps, psd, be, pcp, cds, pp, partidos' + oldest_article = 2 + max_articles_per_feed = 100 + no_stylesheets = True + encoding = 'utf-8' + use_embedded_content = False + language = 'pt' + extra_css = ' .publish{font-style: italic; line-height: 1.2em; border-bottom: 1px dotted; padding: 5px 0} .entity{line-height: 1.2em} .overview{line-height:1.2em} ' + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + keep_only_tags = [ + dict(name=['h5','h1']) + , dict(name='div', attrs={'class':['publish','overview','entity']}) + ] + + remove_tags = [ + dict(name=['object','embed','iframe']) + ] + + + feeds = [ + (u'Portugal' , u'http://www.ionline.pt/rss/portugal.xml' ) + ,(u'Mundo' , u'http://www.ionline.pt/rss/mundo.xml' ) + ,(u'Dinheiro' , u'http://www.ionline.pt/rss/dinheiro.xml' ) + ,(u'Desporto' , u'http://www.ionline.pt/rss/desporto.xml' ) + ,(u'Boa Vida' , u'http://www.ionline.pt/rss/boavida.xml' ) + ,(u'iReporter', u'http://www.ionline.pt/rss/ireporter.xml') + ,(u'iBloges' , u'http://www.ionline.pt/rss/iblogues.xml' ) + ,(u'Desporto' , u'http://www.ionline.pt/rss/desporto.xml' ) + ] + + def print_version(self, url): + rest = url.rpartition('/')[2] + lmain = rest.partition('-')[0] + lurl = u'http://www.ionline.pt/interior/index.php?p=news-print&idNota=' + lmain + return lurl + + diff --git a/resources/recipes/nationalreviewonline.recipe b/resources/recipes/nationalreviewonline.recipe new file mode 100644 index 0000000000..5f002019d9 --- /dev/null +++ b/resources/recipes/nationalreviewonline.recipe @@ -0,0 +1,50 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Walt Anthony ' +''' +www.nationalreview.com +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class NRO(BasicNewsRecipe): + title = u'National Review Online' + __author__ = 'Walt Anthony' + description = "National Review is America's most widely read and influential magazine and web site for Republican/conservative news, commentary, and opinion." + publisher = 'National Review, Inc.' + category = 'news, politics, USA' + oldest_article = 3 + max_articles_per_feed = 100 + summary_length = 150 + language = 'en' + encoding = 'utf-8' + use_embedded_content = True + remove_javascript = True + + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + remove_tags = [ + dict(name=['embed','object','iframe']), + + ] + + feeds = [ + + (u'National Review', u'http://www.nationalreview.com/index.xml'), + (u'The Corner', u'http://corner.nationalreview.com/corner.xml'), + (u'The Agenda', u'http://agenda.nationalreview.com/agenda.xml'), + (u'Bench Memos', u'http://bench.nationalreview.com/bench.xml'), + (u'Campaign Spot', u'http://campaignspot.nationalreview.com/campaignspot.xml'), + (u'Critical Care', u'http://healthcare.nationalreview.com/healthcare.xml'), + (u'Doctor, Doctor', u'http://www.nationalreview.com/doctor/doctor.xml'), + (u"Kudlow's Money Politic$", u'http://kudlow.nationalreview.com/kudlow.xml'), + (u'Media Blog', u'http://media.nationalreview.com/media.xml'), + (u'Phi Beta Cons', u'http://phibetacons.nationalreview.com/phibetacons.xml'), + (u'Planet Gore', u'http://planetgore.nationalreview.com/planetgore.xml') + + ] diff --git a/src/calibre/customize/__init__.py b/src/calibre/customize/__init__.py index 53cf82a4a3..ce273e45b2 100644 --- a/src/calibre/customize/__init__.py +++ b/src/calibre/customize/__init__.py @@ -255,12 +255,15 @@ class CatalogPlugin(Plugin): def search_sort_db(self, db, opts): + ''' # Don't add Catalogs to the generated Catalogs - if opts.search_text: - opts.search_text += ' not tag:Catalog' + cat = _('Catalog') + if opts.search_text: + opts.search_text += ' not tag:'+cat else: - opts.search_text = 'not tag:Catalog' - + opts.search_text = 'not tag:'+cat + ''' + db.search(opts.search_text) if opts.sort_by: diff --git a/src/calibre/library/catalog.py b/src/calibre/library/catalog.py index a8755cf15b..a459653cea 100644 --- a/src/calibre/library/catalog.py +++ b/src/calibre/library/catalog.py @@ -68,7 +68,7 @@ class CSV_XML(CatalogPlugin): # If a list of ids are provided, don't use search_text if opts.ids: opts.search_text = None - + data = self.search_sort_db(db, opts) if not len(data): @@ -824,7 +824,7 @@ class EPUB_MOBI(CatalogPlugin): if True: # Build the unique_authors set from existing data - authors = [(record['author'], record['author_sort']) for record in self.booksByAuthor] + authors = [(record['author'], record['author_sort']) for record in self.booksByAuthor] else: # Search_text already initialized # Get the database sorted by author_sort @@ -848,7 +848,7 @@ class EPUB_MOBI(CatalogPlugin): author_list.append(author) authors_concatenated = ", ".join(author_list) authors.append((authors_concatenated, record['author_sort'])) - + # authors[] contains a list of all book authors, with multiple entries for multiple books by author # unique_authors : (([0]:friendly [1]:sort [2]:book_count)) @@ -1846,7 +1846,7 @@ class EPUB_MOBI(CatalogPlugin): if single_article_per_section: # Create a single article for all authors in this section # THIS CODE NEEDS TO BE REVIEWED FOR .upper() - + # Build a formatted author range for article preview single_list = [] for author in self.authors: