mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
implicit string concatenation (extra-edit)
This commit is contained in:
parent
ac4fbfc7c9
commit
8810c94933
@ -201,24 +201,24 @@ class BBCBrasilRecipe(BasicNewsRecipe):
|
|||||||
conversion_options = {'smarten_punctuation': True}
|
conversion_options = {'smarten_punctuation': True}
|
||||||
|
|
||||||
# Specify extra CSS - overrides ALL other CSS (IE. Added last).
|
# Specify extra CSS - overrides ALL other CSS (IE. Added last).
|
||||||
extra_css = 'body { font-family: verdana, helvetica, sans-serif; } \
|
extra_css = '''body { font-family: verdana, helvetica, sans-serif; }
|
||||||
.introduction, .first { font-weight: bold; } \
|
.introduction, .first { font-weight: bold; }
|
||||||
.cross-head { font-weight: bold; font-size: 125%; } \
|
.cross-head { font-weight: bold; font-size: 125%; }
|
||||||
.cap, .caption { display: block; font-size: 80%; font-style: italic; } \
|
.cap, .caption { display: block; font-size: 80%; font-style: italic; }
|
||||||
.cap, .caption, .caption img, .caption span { display: block; text-align: center; margin: 5px auto; } \
|
.cap, .caption, .caption img, .caption span { display: block; text-align: center; margin: 5px auto; }
|
||||||
.byl, .byd, .byline img, .byline-name, .byline-title, .author-name, .author-position, \
|
.byl, .byd, .byline img, .byline-name, .byline-title, .author-name, .author-position,
|
||||||
.correspondent-portrait img, .byline-lead-in, .name, .role, .bbc-role { display: block; \
|
.correspondent-portrait img, .byline-lead-in, .name, .role, .bbc-role { display: block;
|
||||||
text-align: center; font-size: 80%; font-style: italic; margin: 1px auto; } \
|
text-align: center; font-size: 80%; font-style: italic; margin: 1px auto; }
|
||||||
.story-date, .published, .datestamp { font-size: 80%; } \
|
.story-date, .published, .datestamp { font-size: 80%; }
|
||||||
table { width: 100%; } \
|
table { width: 100%; }
|
||||||
td img { display: block; margin: 5px auto; } \
|
td img { display: block; margin: 5px auto; }
|
||||||
ul { padding-top: 10px; } \
|
ul { padding-top: 10px; }
|
||||||
ol { padding-top: 10px; } \
|
ol { padding-top: 10px; }
|
||||||
li { padding-top: 5px; padding-bottom: 5px; } \
|
li { padding-top: 5px; padding-bottom: 5px; }
|
||||||
h1 { text-align: center; font-size: 175%; font-weight: bold; } \
|
h1 { text-align: center; font-size: 175%; font-weight: bold; }
|
||||||
h2 { text-align: center; font-size: 150%; font-weight: bold; } \
|
h2 { text-align: center; font-size: 150%; font-weight: bold; }
|
||||||
h3 { text-align: center; font-size: 125%; font-weight: bold; } \
|
h3 { text-align: center; font-size: 125%; font-weight: bold; }
|
||||||
h4, h5, h6 { text-align: center; font-size: 100%; font-weight: bold; }'
|
h4, h5, h6 { text-align: center; font-size: 100%; font-weight: bold; }'''
|
||||||
|
|
||||||
# Remove various tag attributes to improve the look of the ebook pages.
|
# Remove various tag attributes to improve the look of the ebook pages.
|
||||||
remove_attributes = ['border', 'cellspacing', 'align', 'cellpadding', 'colspan',
|
remove_attributes = ['border', 'cellspacing', 'align', 'cellpadding', 'colspan',
|
||||||
|
@ -33,24 +33,24 @@ class CommonDreams(BasicNewsRecipe):
|
|||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
|
|
||||||
# Specify extra CSS - overrides ALL other CSS (IE. Added last).
|
# Specify extra CSS - overrides ALL other CSS (IE. Added last).
|
||||||
extra_css = 'body { font-family: verdana, helvetica, sans-serif; } \
|
extra_css = '''body { font-family: verdana, helvetica, sans-serif; }
|
||||||
.introduction, .first { font-weight: bold; } \
|
.introduction, .first { font-weight: bold; }
|
||||||
.cross-head { font-weight: bold; font-size: 125%; } \
|
.cross-head { font-weight: bold; font-size: 125%; }
|
||||||
.cap, .caption { display: block; font-size: 80%; font-style: italic; } \
|
.cap, .caption { display: block; font-size: 80%; font-style: italic; }
|
||||||
.cap, .caption, .caption img, .caption span { display: block; margin: 5px auto; } \
|
.cap, .caption, .caption img, .caption span { display: block; margin: 5px auto; }
|
||||||
.byl, .byd, .byline img, .byline-name, .byline-title, .author-name, .author-position, \
|
.byl, .byd, .byline img, .byline-name, .byline-title, .author-name, .author-position,
|
||||||
.correspondent-portrait img, .byline-lead-in, .name, .bbc-role { display: block; \
|
.correspondent-portrait img, .byline-lead-in, .name, .bbc-role { display: block;
|
||||||
font-size: 80%; font-style: italic; margin: 1px auto; } \
|
font-size: 80%; font-style: italic; margin: 1px auto; }
|
||||||
.story-date, .published { font-size: 80%; } \
|
.story-date, .published { font-size: 80%; }
|
||||||
table { width: 100%; } \
|
table { width: 100%; }
|
||||||
td img { display: block; margin: 5px auto; } \
|
td img { display: block; margin: 5px auto; }
|
||||||
ul { padding-top: 10px; } \
|
ul { padding-top: 10px; }
|
||||||
ol { padding-top: 10px; } \
|
ol { padding-top: 10px; }
|
||||||
li { padding-top: 5px; padding-bottom: 5px; } \
|
li { padding-top: 5px; padding-bottom: 5px; }
|
||||||
h1 { font-size: 175%; font-weight: bold; } \
|
h1 { font-size: 175%; font-weight: bold; }
|
||||||
h2 { font-size: 150%; font-weight: bold; } \
|
h2 { font-size: 150%; font-weight: bold; }
|
||||||
h3 { font-size: 125%; font-weight: bold; } \
|
h3 { font-size: 125%; font-weight: bold; }
|
||||||
h4, h5, h6 { font-size: 100%; font-weight: bold; }'
|
h4, h5, h6 { font-size: 100%; font-weight: bold; }'''
|
||||||
|
|
||||||
# Remove the line breaks and float left/right and picture width/height.
|
# Remove the line breaks and float left/right and picture width/height.
|
||||||
preprocess_regexps = [(re.compile(r'<br[ ]*/>', re.IGNORECASE), lambda m: ''),
|
preprocess_regexps = [(re.compile(r'<br[ ]*/>', re.IGNORECASE), lambda m: ''),
|
||||||
|
@ -19,9 +19,9 @@ class DigiZoneCZ(BasicNewsRecipe):
|
|||||||
publication_type = 'newsportal'
|
publication_type = 'newsportal'
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
extra_css = 'p.perex{font-size: 1.2em; margin: 0 0 10px 0;line-height: 1.4;padding: 0 0 10px 0;font-weight: bold;} \
|
extra_css = '''p.perex{font-size: 1.2em; margin: 0 0 10px 0;line-height: 1.4;padding: 0 0 10px 0;font-weight: bold;}
|
||||||
p.perex img {display:none;} \
|
p.perex img {display:none;}
|
||||||
.urs p {margin: 0 0 0.8em 0;}'
|
.urs p {margin: 0 0 0.8em 0;}'''
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Aktuality', u'http://rss.digizone.cz/aktuality'),
|
(u'Aktuality', u'http://rss.digizone.cz/aktuality'),
|
||||||
|
@ -81,11 +81,11 @@ class DiscoverMagazine(BasicNewsRecipe):
|
|||||||
preprocess_regexps = [(re.compile(r'<br[ ]*/>', re.IGNORECASE), lambda m: ''),
|
preprocess_regexps = [(re.compile(r'<br[ ]*/>', re.IGNORECASE), lambda m: ''),
|
||||||
(re.compile(r'<br[ ]*clear.*/>', re.IGNORECASE), lambda m: '')]
|
(re.compile(r'<br[ ]*clear.*/>', re.IGNORECASE), lambda m: '')]
|
||||||
|
|
||||||
extra_css = 'body { font-family: helvetica, sans-serif; } \
|
extra_css = '''body { font-family: helvetica, sans-serif; }
|
||||||
.belowdeck {font-style: italic; padding=bottom: 10px; max-width: none} \
|
.belowdeck {font-style: italic; padding=bottom: 10px; max-width: none}
|
||||||
.caption {font-style: italic; padding=bottom: 10px; max-width: none} \
|
.caption {font-style: italic; padding=bottom: 10px; max-width: none}
|
||||||
.caption1 {font-style: italic; padding=bottom: 10px; max-width: none} \
|
.caption1 {font-style: italic; padding=bottom: 10px; max-width: none}
|
||||||
h2 { text-align: left; font-size: 1em; font-weight: bold; }}'
|
h2 { text-align: left; font-size: 1em; font-weight: bold; }}'''
|
||||||
|
|
||||||
def parse_index(self):
|
def parse_index(self):
|
||||||
# gets current month from homepage and append to index
|
# gets current month from homepage and append to index
|
||||||
|
@ -11,8 +11,8 @@ class FSP(BasicNewsRecipe):
|
|||||||
|
|
||||||
title = u'Folha de S\xE3o Paulo'
|
title = u'Folha de S\xE3o Paulo'
|
||||||
__author__ = 'Joao Eduardo Bertacchi - lc_addicted, 2020 Leonardo Amaral - leleobhz'
|
__author__ = 'Joao Eduardo Bertacchi - lc_addicted, 2020 Leonardo Amaral - leleobhz'
|
||||||
description = u'Printed edition contents. Folha subscription required (UOL subscription currently not supported).' + \
|
description = (u'Printed edition contents. Folha subscription required (UOL subscription currently not supported).'
|
||||||
u' [Conte\xfado completo da edi\xe7\xe3o impressa. Somente para assinantes Folha. N\xE3o suporta assinantes UOL]'
|
u' [Conte\xfado completo da edi\xe7\xe3o impressa. Somente para assinantes Folha. N\xE3o suporta assinantes UOL]')
|
||||||
|
|
||||||
today = datetime.date.today()
|
today = datetime.date.today()
|
||||||
|
|
||||||
|
@ -92,17 +92,17 @@ class Handelsblatt(BasicNewsRecipe):
|
|||||||
(re.compile(r'( data-src=")([^"]*")', re.IGNORECASE), lambda match: ' src="' + match.group(2))
|
(re.compile(r'( data-src=")([^"]*")', re.IGNORECASE), lambda match: ' src="' + match.group(2))
|
||||||
]
|
]
|
||||||
|
|
||||||
extra_css = 'h2 {font-size: 1em; text-align: left} \
|
extra_css = '''h2 {font-size: 1em; text-align: left}
|
||||||
h3 {font-size: 1em; text-align: left} \
|
h3 {font-size: 1em; text-align: left}
|
||||||
h4 {font-size: 1em; text-align: left; margin-bottom: 0em} \
|
h4 {font-size: 1em; text-align: left; margin-bottom: 0em}
|
||||||
em {font-style: normal; font-weight: bold} \
|
em {font-style: normal; font-weight: bold}
|
||||||
.vhb-subline {font-weight: normal; text-transform: uppercase} \
|
.vhb-subline {font-weight: normal; text-transform: uppercase}
|
||||||
.vhb-headline {font-size: 1.6em} \
|
.vhb-headline {font-size: 1.6em}
|
||||||
.vhb-teaser-head {margin-top: 1em; margin-bottom: 1em} \
|
.vhb-teaser-head {margin-top: 1em; margin-bottom: 1em}
|
||||||
.vhb-hollow-area--innercontent {font-size: 0.6em} \
|
.vhb-hollow-area--innercontent {font-size: 0.6em}
|
||||||
.hcf-location-mark {font-weight: bold} \
|
.hcf-location-mark {font-weight: bold}
|
||||||
.lb-post-header {margin-top: 1em} \
|
.lb-post-header {margin-top: 1em}
|
||||||
.panel-body p {margin-top: 0em}'
|
.panel-body p {margin-top: 0em}'''
|
||||||
|
|
||||||
def get_browser(self):
|
def get_browser(self):
|
||||||
br = BasicNewsRecipe.get_browser(self)
|
br = BasicNewsRecipe.get_browser(self)
|
||||||
|
@ -19,9 +19,9 @@ class LupaCZ(BasicNewsRecipe):
|
|||||||
publication_type = 'newsportal'
|
publication_type = 'newsportal'
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
extra_css = 'p.perex{font-size: 1.2em;margin: 0 0 10px 0;line-height: 1.4;padding: 0 0 10px 0;font-weight: bold;} \
|
extra_css = '''p.perex{font-size: 1.2em;margin: 0 0 10px 0;line-height: 1.4;padding: 0 0 10px 0;font-weight: bold;}
|
||||||
p.perex img {display:none;} \
|
p.perex img {display:none;}
|
||||||
.urs p {margin: 0 0 0.8em 0;}'
|
.urs p {margin: 0 0 0.8em 0;}'''
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Zpr\xe1vi\u010dky', u'http://rss.lupa.cz/zpravicky'),
|
(u'Zpr\xe1vi\u010dky', u'http://rss.lupa.cz/zpravicky'),
|
||||||
|
@ -19,9 +19,9 @@ class MesecCZ(BasicNewsRecipe):
|
|||||||
publication_type = 'newsportal'
|
publication_type = 'newsportal'
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
extra_css = 'p.perex{font-size: 1.2em;margin: 0 0 10px 0;line-height: 1.4;padding: 0 0 10px 0;font-weight: bold;} \
|
extra_css = '''p.perex{font-size: 1.2em;margin: 0 0 10px 0;line-height: 1.4;padding: 0 0 10px 0;font-weight: bold;}
|
||||||
p.perex img {display:none;} \
|
p.perex img {display:none;}
|
||||||
.urs p {margin: 0 0 0.8em 0;}'
|
.urs p {margin: 0 0 0.8em 0;}'''
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Aktuality', u'http://www.mesec.cz/rss/aktuality/'),
|
(u'Aktuality', u'http://www.mesec.cz/rss/aktuality/'),
|
||||||
|
@ -49,24 +49,24 @@ class MWJournal(BasicNewsRecipe):
|
|||||||
'valign', 'vspace', 'hspace', 'alt', 'width', 'height']
|
'valign', 'vspace', 'hspace', 'alt', 'width', 'height']
|
||||||
|
|
||||||
# Specify extra CSS - overrides ALL other CSS (IE. Added last).
|
# Specify extra CSS - overrides ALL other CSS (IE. Added last).
|
||||||
extra_css = 'body { font-family: verdana, helvetica, sans-serif; } \
|
extra_css = '''body { font-family: verdana, helvetica, sans-serif; }
|
||||||
.introduction, .first { font-weight: bold; } \
|
.introduction, .first { font-weight: bold; }
|
||||||
.cross-head { font-weight: bold; font-size: 125%; } \
|
.cross-head { font-weight: bold; font-size: 125%; }
|
||||||
.cap, .caption { display: block; font-size: 80%; font-style: italic; } \
|
.cap, .caption { display: block; font-size: 80%; font-style: italic; }
|
||||||
.cap, .caption, .caption img, .caption span { display: block; margin: 5px auto; } \
|
.cap, .caption, .caption img, .caption span { display: block; margin: 5px auto; }
|
||||||
.byl, .byd, .byline img, .byline-name, .byline-title, .author-name, .author-position, \
|
.byl, .byd, .byline img, .byline-name, .byline-title, .author-name, .author-position,
|
||||||
.correspondent-portrait img, .byline-lead-in, .name, .bbc-role { display: block; \
|
.correspondent-portrait img, .byline-lead-in, .name, .bbc-role { display: block;
|
||||||
font-size: 80%; font-style: italic; margin: 1px auto; } \
|
font-size: 80%; font-style: italic; margin: 1px auto; }
|
||||||
.story-date, .published { font-size: 80%; } \
|
.story-date, .published { font-size: 80%; }
|
||||||
table { width: 100%; } \
|
table { width: 100%; }
|
||||||
td img { display: block; margin: 5px auto; } \
|
td img { display: block; margin: 5px auto; }
|
||||||
ul { padding-top: 10px; } \
|
ul { padding-top: 10px; }
|
||||||
ol { padding-top: 10px; } \
|
ol { padding-top: 10px; }
|
||||||
li { padding-top: 5px; padding-bottom: 5px; } \
|
li { padding-top: 5px; padding-bottom: 5px; }
|
||||||
h1 { font-size: 175%; font-weight: bold; } \
|
h1 { font-size: 175%; font-weight: bold; }
|
||||||
h2 { font-size: 150%; font-weight: bold; } \
|
h2 { font-size: 150%; font-weight: bold; }
|
||||||
h3 { font-size: 125%; font-weight: bold; } \
|
h3 { font-size: 125%; font-weight: bold; }
|
||||||
h4, h5, h6 { font-size: 100%; font-weight: bold; }'
|
h4, h5, h6 { font-size: 100%; font-weight: bold; }'''
|
||||||
|
|
||||||
# Remove the line breaks, href links and float left/right and picture
|
# Remove the line breaks, href links and float left/right and picture
|
||||||
# width/height.
|
# width/height.
|
||||||
|
@ -19,9 +19,9 @@ class PodnikatelCZ(BasicNewsRecipe):
|
|||||||
publication_type = 'newsportal'
|
publication_type = 'newsportal'
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
extra_css = 'p.perex{font-size: 1.2em; margin: 0 0 10px 0;line-height: 1.4;padding: 0 0 10px 0;font-weight: bold;} \
|
extra_css = '''p.perex{font-size: 1.2em; margin: 0 0 10px 0;line-height: 1.4;padding: 0 0 10px 0;font-weight: bold;}
|
||||||
p.perex img {display:none;} \
|
p.perex img {display:none;}
|
||||||
.urs p {margin: 0 0 0.8em 0;}'
|
.urs p {margin: 0 0 0.8em 0;}'''
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Aktuality', u'http://rss.podnikatel.cz/aktuality'),
|
(u'Aktuality', u'http://rss.podnikatel.cz/aktuality'),
|
||||||
|
@ -37,17 +37,17 @@ class respektRecipe(BasicNewsRecipe):
|
|||||||
dict(name='script')
|
dict(name='script')
|
||||||
]
|
]
|
||||||
|
|
||||||
extra_css = 'p {text-align:justify;margin-top:0;margin-bottom:0} \
|
extra_css = '''p {text-align:justify;margin-top:0;margin-bottom:0}
|
||||||
ul {color:black} \
|
ul {color:black}
|
||||||
.frame-caption {font-weight:normal;font-size:50%;font-style:italic;} \
|
.frame-caption {font-weight:normal;font-size:50%;font-style:italic;}
|
||||||
h1 {font-size:150%;margin-bottom:0;} \
|
h1 {font-size:150%;margin-bottom:0;}
|
||||||
h2 {font-size:100%;margin-bottom:0;} \
|
h2 {font-size:100%;margin-bottom:0;}
|
||||||
.post-subtitle {margin-top:0;} \
|
.post-subtitle {margin-top:0;}
|
||||||
h3 {font-size:100%;margin-bottom:0;margin-top:0;} \
|
h3 {font-size:100%;margin-bottom:0;margin-top:0;}
|
||||||
.box-title {background-color: lightgray;font-size:150%;font-weight:bold;margin-left:12%;margin-right:12%;margin-top:12%;margin-bottom:0;} \
|
.box-title {background-color: lightgray;font-size:150%;font-weight:bold;margin-left:12%;margin-right:12%;margin-top:12%;margin-bottom:0;}
|
||||||
.box-content {background-color:lightgray;margin-left:12%;margin-right:12%;margin-top:0;margin-bottom:12%;} \
|
.box-content {background-color:lightgray;margin-left:12%;margin-right:12%;margin-top:0;margin-bottom:12%;}
|
||||||
p.indent_first_line {text-indent:30px;} \
|
p.indent_first_line {text-indent:30px;}
|
||||||
a {text-decoration:none;color:black;}'
|
a {text-decoration:none;color:black;}'''
|
||||||
|
|
||||||
needs_subscription = True
|
needs_subscription = True
|
||||||
|
|
||||||
|
@ -47,24 +47,24 @@ class SatMagazine(BasicNewsRecipe):
|
|||||||
'valign', 'vspace', 'hspace', 'alt', 'width', 'height']
|
'valign', 'vspace', 'hspace', 'alt', 'width', 'height']
|
||||||
|
|
||||||
# Specify extra CSS - overrides ALL other CSS (IE. Added last).
|
# Specify extra CSS - overrides ALL other CSS (IE. Added last).
|
||||||
extra_css = 'body { font-family: verdana, helvetica, sans-serif; } \
|
extra_css = '''body { font-family: verdana, helvetica, sans-serif; }
|
||||||
.introduction, .first { font-weight: bold; } \
|
.introduction, .first { font-weight: bold; }
|
||||||
.cross-head { font-weight: bold; font-size: 125%; } \
|
.cross-head { font-weight: bold; font-size: 125%; }
|
||||||
.cap, .caption { display: block; font-size: 80%; font-style: italic; } \
|
.cap, .caption { display: block; font-size: 80%; font-style: italic; }
|
||||||
.cap, .caption, .caption img, .caption span { display: block; margin: 5px auto; } \
|
.cap, .caption, .caption img, .caption span { display: block; margin: 5px auto; }
|
||||||
.byl, .byd, .byline img, .byline-name, .byline-title, .author-name, .author-position, \
|
.byl, .byd, .byline img, .byline-name, .byline-title, .author-name, .author-position,
|
||||||
.correspondent-portrait img, .byline-lead-in, .name, .bbc-role { display: block; \
|
.correspondent-portrait img, .byline-lead-in, .name, .bbc-role { display: block;
|
||||||
font-size: 80%; font-style: italic; margin: 1px auto; } \
|
font-size: 80%; font-style: italic; margin: 1px auto; }
|
||||||
.story-date, .published { font-size: 80%; } \
|
.story-date, .published { font-size: 80%; }
|
||||||
table { width: 100%; } \
|
table { width: 100%; }
|
||||||
td img { display: block; margin: 5px auto; } \
|
td img { display: block; margin: 5px auto; }
|
||||||
ul { padding-top: 10px; } \
|
ul { padding-top: 10px; }
|
||||||
ol { padding-top: 10px; } \
|
ol { padding-top: 10px; }
|
||||||
li { padding-top: 5px; padding-bottom: 5px; } \
|
li { padding-top: 5px; padding-bottom: 5px; }
|
||||||
h1 { font-size: 175%; font-weight: bold; } \
|
h1 { font-size: 175%; font-weight: bold; }
|
||||||
h2 { font-size: 150%; font-weight: bold; } \
|
h2 { font-size: 150%; font-weight: bold; }
|
||||||
h3 { font-size: 125%; font-weight: bold; } \
|
h3 { font-size: 125%; font-weight: bold; }
|
||||||
h4, h5, h6 { font-size: 100%; font-weight: bold; }'
|
h4, h5, h6 { font-size: 100%; font-weight: bold; }'''
|
||||||
|
|
||||||
# Remove the line breaks, href links and float left/right and picture
|
# Remove the line breaks, href links and float left/right and picture
|
||||||
# width/height.
|
# width/height.
|
||||||
|
@ -41,10 +41,10 @@ class AdvancedUserRecipe1450864843(BasicNewsRecipe):
|
|||||||
|
|
||||||
conversion_options = {'base_font_size': 12}
|
conversion_options = {'base_font_size': 12}
|
||||||
|
|
||||||
extra_css = 'h1 { font-size: 150%; font-weight: bold; } \
|
extra_css = '''h1 { font-size: 150%; font-weight: bold; }
|
||||||
h2 { font-size: 120%; font-weight: bold; } \
|
h2 { font-size: 120%; font-weight: bold; }
|
||||||
h3 { font-size: 100%; font-style: italic; } \
|
h3 { font-size: 100%; font-style: italic; }
|
||||||
h4, h5, h6 { font-size: 100%; font-style: italic; }'
|
h4, h5, h6 { font-size: 100%; font-style: italic; }'''
|
||||||
|
|
||||||
def get_cover_url(self):
|
def get_cover_url(self):
|
||||||
self.cover_url = 'http://newsmail.cleartext.ch/referenz_tagesanzeiger.jpg'
|
self.cover_url = 'http://newsmail.cleartext.ch/referenz_tagesanzeiger.jpg'
|
||||||
|
@ -19,11 +19,11 @@ class VitaliaCZ(BasicNewsRecipe):
|
|||||||
publication_type = 'newsportal'
|
publication_type = 'newsportal'
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
extra_css = 'p.perex{font-size: 1.2em; margin: 0 0 10px 0; line-height: 1.4; padding: 0 0 10px 0; font-weight: bold;} \
|
extra_css = '''p.perex{font-size: 1.2em; margin: 0 0 10px 0; line-height: 1.4; padding: 0 0 10px 0; font-weight: bold;}
|
||||||
p.perex img {display:none;} \
|
p.perex img {display:none;}
|
||||||
span.author {font-size:0.8em; font-style:italic} \
|
span.author {font-size:0.8em; font-style:italic}
|
||||||
.urs div.rs-tip-major {padding:0.5em; background: #e0e0e0 none repeat scroll 0 0;border: 1px solid #909090;} \
|
.urs div.rs-tip-major {padding:0.5em; background: #e0e0e0 none repeat scroll 0 0;border: 1px solid #909090;}
|
||||||
.urs p {margin: 0 0 0.8em 0;}'
|
.urs p {margin: 0 0 0.8em 0;}'''
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Aktuality', 'http://www.vitalia.cz/rss/aktuality/'),
|
(u'Aktuality', 'http://www.vitalia.cz/rss/aktuality/'),
|
||||||
|
@ -32,21 +32,21 @@ class ZAOBAO(BasicNewsRecipe):
|
|||||||
dict(name='div', attrs={'width': '30%'}),
|
dict(name='div', attrs={'width': '30%'}),
|
||||||
]
|
]
|
||||||
|
|
||||||
extra_css = '\n\
|
extra_css = '''
|
||||||
@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)}\n\
|
@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)}
|
||||||
body{font-family: serif1, serif}\n\
|
body{font-family: serif1, serif}
|
||||||
.article_description{font-family: serif1, serif}\n\
|
.article_description{font-family: serif1, serif}
|
||||||
p{font-family: serif1, serif}\n\
|
p{font-family: serif1, serif}
|
||||||
h1 {font-weight: bold; font-size: large;}\n\
|
h1 {font-weight: bold; font-size: large;}
|
||||||
h2 {font-size: large;}\n\
|
h2 {font-size: large;}
|
||||||
.title {font-size: large;}\n\
|
.title {font-size: large;}
|
||||||
.article {font-size:medium}\n\
|
.article {font-size:medium}
|
||||||
.navbar {font-size: small}\n\
|
.navbar {font-size: small}
|
||||||
.feed{font-size: medium}\n\
|
.feed{font-size: medium}
|
||||||
.small{font-size: small;padding-right: 8pt}\n\
|
.small{font-size: small;padding-right: 8pt}
|
||||||
.text{padding-right: 8pt}\n\
|
.text{padding-right: 8pt}
|
||||||
p{text-indent: 0cm}\n\
|
p{text-indent: 0cm}
|
||||||
div#content{padding-right: 10pt}'
|
div#content{padding-right: 10pt}'''
|
||||||
|
|
||||||
INDEXES = [
|
INDEXES = [
|
||||||
(u'\u65b0\u95fb\u56fe\u7247',
|
(u'\u65b0\u95fb\u56fe\u7247',
|
||||||
|
@ -45,10 +45,10 @@ class ZeitDe(BasicNewsRecipe):
|
|||||||
|
|
||||||
masthead_url = 'https://static.zeit.de/p/zeit.web/3.714/images/structured-data-publisher-logo-zon.png'
|
masthead_url = 'https://static.zeit.de/p/zeit.web/3.714/images/structured-data-publisher-logo-zon.png'
|
||||||
|
|
||||||
extra_css = '.figure__text { font-size: 0.9em; font-style: italic; } \
|
extra_css = '''.figure__text { font-size: 0.9em; font-style: italic; }
|
||||||
.figure__copyright { font-size: 0.9em; font-style: italic; color: #888; } \
|
.figure__copyright { font-size: 0.9em; font-style: italic; color: #888; }
|
||||||
.article-heading__kicker { font-size: 0.5em; display: block; margin-bottom: 1em; } \
|
.article-heading__kicker { font-size: 0.5em; display: block; margin-bottom: 1em; }
|
||||||
p.summary { font-size: 1.3em; font-style: italic; } '
|
p.summary { font-size: 1.3em; font-style: italic; } '''
|
||||||
|
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
dict(name='aside', class_='topicbox'),
|
dict(name='aside', class_='topicbox'),
|
||||||
|
@ -3025,16 +3025,16 @@ class KOBOTOUCH(KOBO):
|
|||||||
if show_debug:
|
if show_debug:
|
||||||
debug_print('KoboTouch:set_filesize_in_device_database contentID="%s"'%contentID)
|
debug_print('KoboTouch:set_filesize_in_device_database contentID="%s"'%contentID)
|
||||||
|
|
||||||
test_query = 'SELECT ___FileSize ' \
|
test_query = ('SELECT ___FileSize '
|
||||||
'FROM content ' \
|
'FROM content '
|
||||||
'WHERE ContentID = ? ' \
|
'WHERE ContentID = ? '
|
||||||
' AND ContentType = 6'
|
' AND ContentType = 6')
|
||||||
test_values = (contentID, )
|
test_values = (contentID, )
|
||||||
|
|
||||||
updatequery = 'UPDATE content ' \
|
updatequery = ('UPDATE content '
|
||||||
'SET ___FileSize = ? ' \
|
'SET ___FileSize = ? '
|
||||||
'WHERE ContentId = ? ' \
|
'WHERE ContentId = ? '
|
||||||
'AND ContentType = 6'
|
'AND ContentType = 6')
|
||||||
|
|
||||||
cursor = connection.cursor()
|
cursor = connection.cursor()
|
||||||
cursor.execute(test_query, test_values)
|
cursor.execute(test_query, test_values)
|
||||||
@ -3199,11 +3199,11 @@ class KOBOTOUCH(KOBO):
|
|||||||
)
|
)
|
||||||
shelf_type = 'UserTag' # if self.supports_reading_list else None
|
shelf_type = 'UserTag' # if self.supports_reading_list else None
|
||||||
if self.dbversion < 64:
|
if self.dbversion < 64:
|
||||||
addquery += ' ("CreationDate","InternalName","LastModified","Name","_IsDeleted","_IsVisible","_IsSynced")'\
|
addquery += ' ("CreationDate","InternalName","LastModified","Name","_IsDeleted","_IsVisible","_IsSynced")'
|
||||||
' VALUES (?, ?, ?, ?, ?, ?, ?)'
|
addquery += ' VALUES (?, ?, ?, ?, ?, ?, ?)'
|
||||||
else:
|
else:
|
||||||
addquery += ' ("CreationDate", "InternalName","LastModified","Name","_IsDeleted","_IsVisible","_IsSynced", "Id", "Type")'\
|
addquery += ' ("CreationDate", "InternalName","LastModified","Name","_IsDeleted","_IsVisible","_IsSynced", "Id", "Type")'
|
||||||
' VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)'
|
addquery += ' VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)'
|
||||||
add_values = add_values +(bookshelf_name, shelf_type)
|
add_values = add_values +(bookshelf_name, shelf_type)
|
||||||
|
|
||||||
if show_debug:
|
if show_debug:
|
||||||
|
@ -211,8 +211,7 @@ class Colors:
|
|||||||
if hex_num is None:
|
if hex_num is None:
|
||||||
hex_num = '0'
|
hex_num = '0'
|
||||||
if self.__run_level > 3:
|
if self.__run_level > 3:
|
||||||
msg = 'no value in self.__color_dict' \
|
msg = 'no value in self.__color_dict for key %s at line %d\n' % (num, self.__line)
|
||||||
'for key %s at line %d\n' % (num, self.__line)
|
|
||||||
raise self.__bug_handler(msg)
|
raise self.__bug_handler(msg)
|
||||||
return hex_num
|
return hex_num
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class ConvertToTags:
|
|||||||
'style-group', 'border-group','styles-in-body', 'paragraph-style-in-body',
|
'style-group', 'border-group','styles-in-body', 'paragraph-style-in-body',
|
||||||
'list-in-table', 'level-in-table', 'override-table','override-list',
|
'list-in-table', 'level-in-table', 'override-table','override-list',
|
||||||
)
|
)
|
||||||
self.__two_new_line = ('section', 'body', 'table', 'row' 'list-table')
|
self.__two_new_line = ('section', 'body', 'table', 'row', 'list-table')
|
||||||
self.__state_dict = {
|
self.__state_dict = {
|
||||||
'default' : self.__default_func,
|
'default' : self.__default_func,
|
||||||
'mi<tg<open______' : self.__open_func,
|
'mi<tg<open______' : self.__open_func,
|
||||||
|
@ -313,20 +313,20 @@ Examples
|
|||||||
inner_field_string = '%scb<nu<clos-brack<%s\n' % \
|
inner_field_string = '%scb<nu<clos-brack<%s\n' % \
|
||||||
(instruction, last_bracket)
|
(instruction, last_bracket)
|
||||||
elif sec_in_field or par_in_field:
|
elif sec_in_field or par_in_field:
|
||||||
inner_field_string = \
|
inner_field_string = (
|
||||||
'mi<mk<fldbkstart\n'\
|
'mi<mk<fldbkstart\n'
|
||||||
'mi<tg<open-att__<field-block<type>%s\n%s'\
|
'mi<tg<open-att__<field-block<type>%s\n%s'
|
||||||
'mi<mk<fldbk-end_\n' \
|
'mi<mk<fldbk-end_\n'
|
||||||
'mi<tg<close_____<field-block\n'\
|
'mi<tg<close_____<field-block\n'
|
||||||
'mi<mk<fld-bk-end\n' \
|
'mi<mk<fld-bk-end\n'
|
||||||
% (instruction, inner_field_string)
|
) % (instruction, inner_field_string)
|
||||||
# write a marker to show an inline field for later parsing
|
# write a marker to show an inline field for later parsing
|
||||||
else:
|
else:
|
||||||
inner_field_string = \
|
inner_field_string = (
|
||||||
'%s' \
|
'%s'
|
||||||
'mi<tg<open-att__<field<type>%s\n%s'\
|
'mi<tg<open-att__<field<type>%s\n%s'
|
||||||
'mi<tg<close_____<field\n'\
|
'mi<tg<close_____<field\n'
|
||||||
% (self.__marker, instruction, inner_field_string)
|
) % (self.__marker, instruction, inner_field_string)
|
||||||
if sec_in_field:
|
if sec_in_field:
|
||||||
inner_field_string = 'mi<mk<sec-fd-beg\n' + inner_field_string + \
|
inner_field_string = 'mi<mk<sec-fd-beg\n' + inner_field_string + \
|
||||||
'mi<mk<sec-fd-end\n'
|
'mi<mk<sec-fd-end\n'
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' \
|
__copyright__ = ('2008, Kovid Goyal kovid@kovidgoyal.net'
|
||||||
'2010, John Schember <john@nachtimwald.com>'
|
'2010, John Schember <john@nachtimwald.com>')
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
from qt.core import QDialog, QHBoxLayout, QIcon, QLabel, QPushButton, QSizePolicy, Qt, QVBoxLayout
|
from qt.core import QDialog, QHBoxLayout, QIcon, QLabel, QPushButton, QSizePolicy, Qt, QVBoxLayout
|
||||||
|
@ -53,8 +53,8 @@ class LitResStore(BasicStoreConfig, StorePlugin):
|
|||||||
d.exec()
|
d.exec()
|
||||||
|
|
||||||
def search(self, query, max_results=10, timeout=60):
|
def search(self, query, max_results=10, timeout=60):
|
||||||
search_url = u'http://robot.litres.ru/pages/catalit_browser/?checkpoint=2000-01-02&'\
|
search_url = (u'http://robot.litres.ru/pages/catalit_browser/?checkpoint=2000-01-02'
|
||||||
'search=%s&limit=0,%s'
|
'&search=%s&limit=0,%s')
|
||||||
search_url = search_url % (quote(query), max_results)
|
search_url = search_url % (quote(query), max_results)
|
||||||
|
|
||||||
counter = max_results
|
counter = max_results
|
||||||
|
@ -43,7 +43,17 @@ d['preview_background'] = 'auto'
|
|||||||
d['preview_foreground'] = 'auto'
|
d['preview_foreground'] = 'auto'
|
||||||
d['preview_link_color'] = 'auto'
|
d['preview_link_color'] = 'auto'
|
||||||
d['remove_existing_links_when_linking_sheets'] = True
|
d['remove_existing_links_when_linking_sheets'] = True
|
||||||
d['charmap_favorites'] = list(map(ord, '\xa0\u2002\u2003\u2009\xad' '‘’“”‹›«»‚„' '—–§¶†‡©®™' '→⇒•·°±−×÷¼½½¾' '…µ¢£€¿¡¨´¸ˆ˜' 'ÀÁÂÃÄÅÆÇÈÉÊË' 'ÌÍÎÏÐÑÒÓÔÕÖØ' 'ŒŠÙÚÛÜÝŸÞßàá' 'âãäåæçèéêëìí' 'îïðñòóôõöøœš' 'ùúûüýÿþªºαΩ∞')) # noqa: E501
|
d['charmap_favorites'] = list(map(ord, ('\xa0\u2002\u2003\u2009\xad'
|
||||||
|
'‘’“”‹›«»‚„'
|
||||||
|
'—–§¶†‡©®™'
|
||||||
|
'→⇒•·°±−×÷¼½½¾'
|
||||||
|
'…µ¢£€¿¡¨´¸ˆ˜'
|
||||||
|
'ÀÁÂÃÄÅÆÇÈÉÊË'
|
||||||
|
'ÌÍÎÏÐÑÒÓÔÕÖØ'
|
||||||
|
'ŒŠÙÚÛÜÝŸÞßàá'
|
||||||
|
'âãäåæçèéêëìí'
|
||||||
|
'îïðñòóôõöøœš'
|
||||||
|
'ùúûüýÿþªºαΩ∞')))
|
||||||
d['folders_for_types'] = {'style':'styles', 'image':'images', 'font':'fonts', 'audio':'audio', 'video':'video'}
|
d['folders_for_types'] = {'style':'styles', 'image':'images', 'font':'fonts', 'audio':'audio', 'video':'video'}
|
||||||
d['pretty_print_on_open'] = False
|
d['pretty_print_on_open'] = False
|
||||||
d['disable_completion_popup_for_search'] = False
|
d['disable_completion_popup_for_search'] = False
|
||||||
|
@ -82,8 +82,8 @@ class Restore(Thread):
|
|||||||
|
|
||||||
if self.conflicting_custom_cols:
|
if self.conflicting_custom_cols:
|
||||||
ans += '\n\n'
|
ans += '\n\n'
|
||||||
ans += 'The following custom columns have conflicting definitions ' \
|
ans += ('The following custom columns have conflicting definitions '
|
||||||
'and were not fully restored:\n'
|
'and were not fully restored:\n')
|
||||||
for x in self.conflicting_custom_cols:
|
for x in self.conflicting_custom_cols:
|
||||||
ans += '\t#'+x+'\n'
|
ans += '\t#'+x+'\n'
|
||||||
ans += '\tused:\t%s, %s, %s, %s\n'%(self.custom_columns[x][1],
|
ans += '\tused:\t%s, %s, %s, %s\n'%(self.custom_columns[x][1],
|
||||||
|
@ -25,7 +25,7 @@ def fts_search(ctx, rd):
|
|||||||
ans = {'metadata': metadata_cache, 'indexing_status': {'left': l, 'total': t}}
|
ans = {'metadata': metadata_cache, 'indexing_status': {'left': l, 'total': t}}
|
||||||
|
|
||||||
use_stemming = rd.query.get('use_stemming', 'y') == 'y'
|
use_stemming = rd.query.get('use_stemming', 'y') == 'y'
|
||||||
query = rd.query.get('query' '')
|
query = rd.query.get('query')
|
||||||
if not query:
|
if not query:
|
||||||
raise HTTPBadRequest('No search query specified')
|
raise HTTPBadRequest('No search query specified')
|
||||||
qid = rd.query.get('query_id')
|
qid = rd.query.get('query_id')
|
||||||
@ -107,7 +107,7 @@ def fts_snippets(ctx, rd, book_ids):
|
|||||||
raise HTTPPreconditionRequired('Full text searching is not enabled on this library')
|
raise HTTPPreconditionRequired('Full text searching is not enabled on this library')
|
||||||
|
|
||||||
use_stemming = rd.query.get('use_stemming', 'y') == 'y'
|
use_stemming = rd.query.get('use_stemming', 'y') == 'y'
|
||||||
query = rd.query.get('query' '')
|
query = rd.query.get('query')
|
||||||
if not query:
|
if not query:
|
||||||
raise HTTPBadRequest('No search query specified')
|
raise HTTPBadRequest('No search query specified')
|
||||||
try:
|
try:
|
||||||
|
@ -159,8 +159,8 @@ class Exit:
|
|||||||
class Helper:
|
class Helper:
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return 'Type help() for interactive help, ' \
|
return ('Type help() for interactive help, '
|
||||||
'or help(object) for help about object.'
|
'or help(object) for help about object.')
|
||||||
|
|
||||||
def __call__(self, *args, **kwds):
|
def __call__(self, *args, **kwds):
|
||||||
import pydoc
|
import pydoc
|
||||||
|
@ -37,8 +37,8 @@ LocalHeader = namedtuple('LocalHeader',
|
|||||||
|
|
||||||
if hasattr(sys, 'getwindowsversion'):
|
if hasattr(sys, 'getwindowsversion'):
|
||||||
windows_reserved_filenames = (
|
windows_reserved_filenames = (
|
||||||
'CON', 'PRN', 'AUX', 'CLOCK$', 'NUL' 'COM0', 'COM1', 'COM2', 'COM3',
|
'CON', 'PRN', 'AUX', 'CLOCK$', 'NUL', 'COM0', 'COM1', 'COM2', 'COM3',
|
||||||
'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9' 'LPT0', 'LPT1', 'LPT2',
|
'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9', 'LPT0', 'LPT1', 'LPT2',
|
||||||
'LPT3', 'LPT4', 'LPT5', 'LPT6', 'LPT7', 'LPT8', 'LPT9')
|
'LPT3', 'LPT4', 'LPT5', 'LPT6', 'LPT7', 'LPT8', 'LPT9')
|
||||||
|
|
||||||
def is_reserved_filename(x):
|
def is_reserved_filename(x):
|
||||||
|
@ -270,8 +270,8 @@ def extract_html(soup, url):
|
|||||||
if '/interactive/' in url:
|
if '/interactive/' in url:
|
||||||
return (
|
return (
|
||||||
'<html><body><p><em>'
|
'<html><body><p><em>'
|
||||||
+ 'This is an interactive article, which is supposed to be read in a browser.'
|
'This is an interactive article, which is supposed to be read in a browser.'
|
||||||
+ '</p></em></body></html>'
|
'</p></em></body></html>'
|
||||||
)
|
)
|
||||||
script = soup.findAll('script', text=lambda x: x and 'window.__preloadedData' in x)[0]
|
script = soup.findAll('script', text=lambda x: x and 'window.__preloadedData' in x)[0]
|
||||||
script = str(script)
|
script = str(script)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user