mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
version 0.6.0
This commit is contained in:
parent
15324627dd
commit
4643668b6f
@ -10,16 +10,20 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
|||||||
|
|
||||||
class BBC(BasicNewsRecipe):
|
class BBC(BasicNewsRecipe):
|
||||||
title = u'The BBC'
|
title = u'The BBC'
|
||||||
__author__ = 'Kovid Goyal'
|
__author__ = 'Kovid Goyal and Sujata Raman'
|
||||||
description = 'Global news and current affairs from the British Broadcasting Corporation'
|
description = 'Global news and current affairs from the British Broadcasting Corporation'
|
||||||
no_stylesheets = True
|
|
||||||
language = _('English')
|
language = _('English')
|
||||||
|
|
||||||
remove_tags = [dict(name='div', attrs={'class':'footer'})]
|
remove_tags = [dict(name='div', attrs={'class':'footer'}),]
|
||||||
extra_css = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt }'
|
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
body{font-family:Arial,Helvetica,sans-serif; font-size:small;}
|
||||||
|
h1{font-size:large;}
|
||||||
|
'''
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
('News Front Page', 'http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml'),
|
('News Front Page', 'http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml'),
|
||||||
('Science/Nature', 'http://newsrss.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss.xml'),
|
('Science/Nature', 'http://newsrss.bbc.co.uk/rss/newsonline_world_edition/science/nature/rss.xml'),
|
||||||
('Technology', 'http://newsrss.bbc.co.uk/rss/newsonline_world_edition/technology/rss.xml'),
|
('Technology', 'http://newsrss.bbc.co.uk/rss/newsonline_world_edition/technology/rss.xml'),
|
||||||
('Enterntainment', 'http://newsrss.bbc.co.uk/rss/newsonline_world_edition/entertainment/rss.xml'),
|
('Enterntainment', 'http://newsrss.bbc.co.uk/rss/newsonline_world_edition/entertainment/rss.xml'),
|
||||||
@ -34,5 +38,8 @@ class BBC(BasicNewsRecipe):
|
|||||||
('Africa', 'http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml'),
|
('Africa', 'http://newsrss.bbc.co.uk/rss/newsonline_world_edition/africa/rss.xml'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def print_version(self, url):
|
def print_version(self, url):
|
||||||
return url.replace('http://', 'http://newsvote.bbc.co.uk/mpapps/pagetools/print/')
|
return url.replace('http://', 'http://newsvote.bbc.co.uk/mpapps/pagetools/print/')
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ except:
|
|||||||
|
|
||||||
def newer(targets, sources):
|
def newer(targets, sources):
|
||||||
'''
|
'''
|
||||||
Return True is sources is newer that targets or if targets
|
Return True if sources is newer that targets or if targets
|
||||||
does not exist.
|
does not exist.
|
||||||
'''
|
'''
|
||||||
for f in targets:
|
for f in targets:
|
||||||
@ -786,7 +786,10 @@ try:
|
|||||||
mkup = '<div><ul>%s</ul></div>'
|
mkup = '<div><ul>%s</ul></div>'
|
||||||
self.current_entry.description = mkup%(''.join(
|
self.current_entry.description = mkup%(''.join(
|
||||||
self.current_entry.description))
|
self.current_entry.description))
|
||||||
|
if match.group(1) == '0.6.0':
|
||||||
|
self.current_entry.description = \
|
||||||
|
'''<div>See <a href="http://calibre.kovidgoyal.net/new_in_6">New in
|
||||||
|
6</a></div>'''
|
||||||
self.rss.items.append(self.current_entry)
|
self.rss.items.append(self.current_entry)
|
||||||
timestamp = r.rev.timezone + r.rev.timestamp
|
timestamp = r.rev.timezone + r.rev.timestamp
|
||||||
self.current_entry = RSSItem(
|
self.current_entry = RSSItem(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user