version 0.6.0

This commit is contained in:
Kovid Goyal 2009-07-24 19:43:45 -06:00
parent 15324627dd
commit 4643668b6f
2 changed files with 17 additions and 7 deletions

View File

@ -10,13 +10,17 @@ 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'),
@ -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/')

View File

@ -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(