From 13642cc42e958f5c0f256c4ff3c9c0681c85e6dc Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 5 Sep 2020 01:48:28 +0200 Subject: [PATCH] Possibility to customize the CSS in the generated RSS digests --- platypush/backend/http/request/rss/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platypush/backend/http/request/rss/__init__.py b/platypush/backend/http/request/rss/__init__.py index 8987b76f54..2f3ff6c39f 100644 --- a/platypush/backend/http/request/rss/__init__.py +++ b/platypush/backend/http/request/rss/__init__.py @@ -31,12 +31,13 @@ class RssUpdates(HttpRequest): 'Chrome/62.0.3202.94 Safari/537.36' 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.dbfile = os.path.join(self.workdir, 'rss.db') self.url = url self.title = title self.max_entries = max_entries + self.css_style = css_style # If true, then the http.webpage plugin will be used to parse the content self.extract_content = extract_content @@ -111,7 +112,7 @@ class RssUpdates(HttpRequest): Feeds digest generated on {} '''.format(self.title, datetime.datetime.now().strftime('%d %B %Y, %H:%M')) - style = ''' + style = self.css_style or ''' body { font-size: 22px; font-family: 'Merriweather', Georgia, 'Times New Roman', Times, serif;