patch-config.py - pkgsrc-localpatches - leot's pkgsrc LOCALPATCHES
(HTM) hg clone https://bitbucket.org/iamleot/pkgsrc-localpatches
(DIR) Log
(DIR) Files
(DIR) Refs
---
patch-config.py
---
1 $NetBSD$
2
3 Add support for inline-links and wrap-links options.
4
5 --- rss2email/config.py.orig 2017-05-22 14:13:37.595465747 +0000
6 +++ rss2email/config.py
7 @@ -51,11 +51,15 @@ class Config (_configparser.ConfigParser
8 """
9 if section not in self:
10 section = 'DEFAULT'
11 + _html2text.config.INLINE_LINKS = self.getboolean(
12 + section, 'inline-links')
13 _html2text.config.UNICODE_SNOB = self.getboolean(
14 section, 'unicode-snob')
15 _html2text.config.LINKS_EACH_PARAGRAPH = self.getboolean(
16 section, 'links-after-each-paragraph')
17 _html2text.config.BODY_WIDTH = self.getint(section, 'body-width')
18 + _html2text.config.WRAP_LINKS = self.getboolean(
19 + section, 'wrap-links')
20
21
22 CONFIG = Config()
23 @@ -174,12 +178,16 @@ CONFIG['DEFAULT'] = _collections.Ordered
24 ' margin-right: 5px;\n'
25 '}\n')),
26 ## html2text options
27 + # Put the links inline instead at the end as a reference
28 + ('inline-links', str(True)),
29 # Use Unicode characters instead of their ascii psuedo-replacements
30 ('unicode-snob', str(False)),
31 # Put the links after each paragraph instead of at the end.
32 ('links-after-each-paragraph', str(False)),
33 # Wrap long lines at position. 0 for no wrapping.
34 ('body-width', str(0)),
35 + # Wrap links during conversion
36 + ('wrap-links', str(True)),
37
38 ### Mailing
39 # Select protocol from: sendmail, smtp, imap