diff --git a/resources/recipes/orlando_sentinel.recipe b/resources/recipes/orlando_sentinel.recipe new file mode 100644 index 0000000000..7a59f6f6ba --- /dev/null +++ b/resources/recipes/orlando_sentinel.recipe @@ -0,0 +1,38 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1279258912(BasicNewsRecipe): + title = u'Orlando Sentinel' + oldest_article = 3 + max_articles_per_feed = 100 + + feeds = [ + (u'News', u'http://feeds.feedburner.com/orlandosentinel/news'), + (u'Opinion', u'http://feeds.feedburner.com/orlandosentinel/news/opinion'), + (u'Business', u'http://feeds.feedburner.com/orlandosentinel/business'), + (u'Technology', u'http://feeds.feedburner.com/orlandosentinel/technology'), + (u'Space and Science', u'http://feeds.feedburner.com/orlandosentinel/news/space'), + (u'Entertainment', u'http://feeds.feedburner.com/orlandosentinel/entertainment'), + (u'Life and Family', u'http://feeds.feedburner.com/orlandosentinel/features/lifestyle'), + ] + __author__ = 'rty' + pubisher = 'OrlandoSentinel.com' + description = 'Orlando, Florida, Newspaper' + category = 'News, Orlando, Florida' + + + remove_javascript = True + use_embedded_content = False + no_stylesheets = True + language = 'en' + encoding = 'utf-8' + conversion_options = {'linearize_tables':True} + masthead_url = 'http://www.orlandosentinel.com/media/graphic/2009-07/46844851.gif' + keep_only_tags = [ + dict(name='div', attrs={'class':'story'}) + ] + remove_tags = [ + dict(name='div', attrs={'class':['articlerail','tools','comment-group','clearfix']}), + ] + remove_tags_after = [ + dict(name='p', attrs={'class':'copyright'}), + ] diff --git a/resources/templates/rtf.xsl b/resources/templates/rtf.xsl index 9199654665..74696f0857 100644 --- a/resources/templates/rtf.xsl +++ b/resources/templates/rtf.xsl @@ -111,7 +111,6 @@ or (@shadow = 'true') or (@hidden = 'true') or (@outline = 'true') - "> @@ -277,6 +276,26 @@ ] + + + + + + + + + + + + + + + + + + + + diff --git a/src/calibre/ebooks/metadata/__init__.py b/src/calibre/ebooks/metadata/__init__.py index d5e7aafb32..e45334777e 100644 --- a/src/calibre/ebooks/metadata/__init__.py +++ b/src/calibre/ebooks/metadata/__init__.py @@ -288,7 +288,8 @@ class MetaInformation(object): 'timestamp', 'lccn', 'lcc', 'ddc', 'pubdate', 'rights', 'publication_type', 'uuid'): if replace_metadata: - setattr(self, attr, getattr(mi, attr, None)) + setattr(self, attr, getattr(mi, attr, 1.0 if \ + attr == 'series_index' else None)) elif hasattr(mi, attr): val = getattr(mi, attr) if val is not None: