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')