mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Removed test for tag:Catalog in CatalogPlugin.search_sort_db()
This commit is contained in:
commit
180843a81e
@ -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
|
||||
|
BIN
resources/images/news/ionline_pt.png
Normal file
BIN
resources/images/news/ionline_pt.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 647 B |
BIN
resources/images/news/nationalreviewonline.png
Normal file
BIN
resources/images/news/nationalreviewonline.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 815 B |
@ -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
|
||||
|
58
resources/recipes/ionline_pt.recipe
Normal file
58
resources/recipes/ionline_pt.recipe
Normal file
@ -0,0 +1,58 @@
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
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
|
||||
|
||||
|
50
resources/recipes/nationalreviewonline.recipe
Normal file
50
resources/recipes/nationalreviewonline.recipe
Normal file
@ -0,0 +1,50 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Walt Anthony <workshop.northpole at gmail.com>'
|
||||
'''
|
||||
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')
|
||||
|
||||
]
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user