new option to ignore links on feeds
This commit is contained in:
parent
9cca4d292a
commit
ec565eda7d
@ -93,6 +93,8 @@ class Entry(Base):
|
|||||||
h2t = html2text.HTML2Text()
|
h2t = html2text.HTML2Text()
|
||||||
h2t.body_width = 0
|
h2t.body_width = 0
|
||||||
h2t.inline_links = False
|
h2t.inline_links = False
|
||||||
|
if feed.html2textignorelinks:
|
||||||
|
h2t.ignore_links = True
|
||||||
if feed.html2textignoreimages:
|
if feed.html2textignoreimages:
|
||||||
h2t.ignore_images = True
|
h2t.ignore_images = True
|
||||||
if feed.contentcolumn == 'summary' and self.summary:
|
if feed.contentcolumn == 'summary' and self.summary:
|
||||||
|
@ -19,6 +19,7 @@ class Feed(Base):
|
|||||||
fullpage = Column(Boolean)
|
fullpage = Column(Boolean)
|
||||||
contentcolumn = Column(Enum('summary', 'content', 'fullpage', 'readability'))
|
contentcolumn = Column(Enum('summary', 'content', 'fullpage', 'readability'))
|
||||||
html2textcontent = Column(Boolean)
|
html2textcontent = Column(Boolean)
|
||||||
|
html2textignorelinks = Column(Boolean)
|
||||||
html2textignoreimages = Column(Boolean)
|
html2textignoreimages = Column(Boolean)
|
||||||
enabled = Column(Boolean)
|
enabled = Column(Boolean)
|
||||||
entries = relationship("Entry", backref=backref('feed'), cascade='all, delete, delete-orphan')
|
entries = relationship("Entry", backref=backref('feed'), cascade='all, delete, delete-orphan')
|
||||||
|
Loading…
Reference in New Issue
Block a user