forked from platypush/platypush
Possibility to customize the CSS in the generated RSS digests
This commit is contained in:
parent
d6f653d834
commit
13642cc42e
1 changed files with 3 additions and 2 deletions
|
@ -31,12 +31,13 @@ class RssUpdates(HttpRequest):
|
||||||
'Chrome/62.0.3202.94 Safari/537.36'
|
'Chrome/62.0.3202.94 Safari/537.36'
|
||||||
|
|
||||||
def __init__(self, url, title=None, headers=None, params=None, max_entries=None,
|
def __init__(self, url, title=None, headers=None, params=None, max_entries=None,
|
||||||
extract_content=False, digest_format=None, *argv, **kwargs):
|
extract_content=False, digest_format=None, css_style=None, *argv, **kwargs):
|
||||||
self.workdir = os.path.join(os.path.expanduser(Config.get('workdir')), 'feeds')
|
self.workdir = os.path.join(os.path.expanduser(Config.get('workdir')), 'feeds')
|
||||||
self.dbfile = os.path.join(self.workdir, 'rss.db')
|
self.dbfile = os.path.join(self.workdir, 'rss.db')
|
||||||
self.url = url
|
self.url = url
|
||||||
self.title = title
|
self.title = title
|
||||||
self.max_entries = max_entries
|
self.max_entries = max_entries
|
||||||
|
self.css_style = css_style
|
||||||
|
|
||||||
# If true, then the http.webpage plugin will be used to parse the content
|
# If true, then the http.webpage plugin will be used to parse the content
|
||||||
self.extract_content = extract_content
|
self.extract_content = extract_content
|
||||||
|
@ -111,7 +112,7 @@ class RssUpdates(HttpRequest):
|
||||||
Feeds digest generated on {} </h2>'''.format(self.title,
|
Feeds digest generated on {} </h2>'''.format(self.title,
|
||||||
datetime.datetime.now().strftime('%d %B %Y, %H:%M'))
|
datetime.datetime.now().strftime('%d %B %Y, %H:%M'))
|
||||||
|
|
||||||
style = '''
|
style = self.css_style or '''
|
||||||
body {
|
body {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
font-family: 'Merriweather', Georgia, 'Times New Roman', Times, serif;
|
font-family: 'Merriweather', Georgia, 'Times New Roman', Times, serif;
|
||||||
|
|
Loading…
Reference in a new issue