From ec565eda7df96a0fd8958ae7bfecc7b337069097 Mon Sep 17 00:00:00 2001 From: Ronald Schaten Date: Tue, 9 Apr 2013 12:23:05 +0200 Subject: [PATCH] new option to ignore links on feeds --- models/entry.py | 2 ++ models/feed.py | 1 + 2 files changed, 3 insertions(+) diff --git a/models/entry.py b/models/entry.py index b212ea5..26250ad 100644 --- a/models/entry.py +++ b/models/entry.py @@ -93,6 +93,8 @@ class Entry(Base): h2t = html2text.HTML2Text() h2t.body_width = 0 h2t.inline_links = False + if feed.html2textignorelinks: + h2t.ignore_links = True if feed.html2textignoreimages: h2t.ignore_images = True if feed.contentcolumn == 'summary' and self.summary: diff --git a/models/feed.py b/models/feed.py index ece320e..40c5d7a 100644 --- a/models/feed.py +++ b/models/feed.py @@ -19,6 +19,7 @@ class Feed(Base): fullpage = Column(Boolean) contentcolumn = Column(Enum('summary', 'content', 'fullpage', 'readability')) html2textcontent = Column(Boolean) + html2textignorelinks = Column(Boolean) html2textignoreimages = Column(Boolean) enabled = Column(Boolean) entries = relationship("Entry", backref=backref('feed'), cascade='all, delete, delete-orphan')