mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Merge from trunk
This commit is contained in:
commit
f5b8c28e08
38
resources/recipes/orlando_sentinel.recipe
Normal file
38
resources/recipes/orlando_sentinel.recipe
Normal file
@ -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'}),
|
||||
]
|
@ -111,7 +111,6 @@
|
||||
or (@shadow = 'true')
|
||||
or (@hidden = 'true')
|
||||
or (@outline = 'true')
|
||||
|
||||
">
|
||||
<emph rend = "paragraph-emph">
|
||||
<xsl:apply-templates/>
|
||||
@ -277,6 +276,26 @@
|
||||
<xsl:value-of select="count(preceding::rtf:footnote) + 1"/>
|
||||
<xsl:text>]</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="(@superscript = 'true')">
|
||||
<xsl:element name="sup">
|
||||
<xsl:element name="span">
|
||||
<xsl:attribute name="class">
|
||||
<c:inline-class/>
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:when test="(@underscript = 'true')">
|
||||
<xsl:element name="sub">
|
||||
<xsl:element name="span">
|
||||
<xsl:attribute name="class">
|
||||
<c:inline-class/>
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:element name="span">
|
||||
<xsl:attribute name="class">
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user