diff --git a/atomstrom.py b/atomstrom.py index 11abb0c..0644918 100755 --- a/atomstrom.py +++ b/atomstrom.py @@ -31,6 +31,7 @@ class Feed(Base): readability = Column(Boolean) fullpage = Column(Boolean) html2textsummary = Column(Boolean) + html2textignoreimages = Column(Boolean) enabled = Column(Boolean) def __init__(self, url, daily, readability, fullpage, enabled, html2textsummary): @@ -270,6 +271,8 @@ def process_feed_entry(session, feed, entry): print ' converting summary' h2t = html2text.HTML2Text() h2t.body_width = 0 + if feed.html2textignoreimages: + h2t.ignore_images = True summary = thisentry.summary.decode('latin-1') summary = h2t.handle(summary) thisentry.summary = summary.encode('latin-1', 'replace')