Changeset 606
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r604 r606 34 34 strip_quotes and strip_signature for ticket updates, closes #192 35 35 Requested by, Patch: Konstantin Ryabitsev <icon add mricon dot com> 36 Appplied by: Bas van der Vlies 37 38 * Added a new option 'strip_signature_regex', default value: 39 * '^-----Original Message-----$|^-- $' 40 This will strip signatures form the email messages. People can set their own regular 41 expressions, closes #296, #155 42 Author: steverweber add gmail dot com 36 43 Appplied by: Bas van der Vlies 37 44 -
trunk/email2trac.py.in
r605 r606 220 220 self.parameters.subject_field_separator = self.parameters.subject_field_separator.strip() 221 221 222 if not self.parameters.strip_signature_regex: 223 self.parameters.strip_signature_regex = '^-----Original Message-----$|^-- $' 224 225 222 226 self.trac_smtp_from = self.get_config('notification', 'smtp_from') 223 227 self.smtp_default_domain = self.get_config('notification', 'smtp_default_domain') … … 1875 1879 1876 1880 body = [] 1881 1882 STRIP_RE = re.compile( self.parameters.strip_signature_regex ) 1877 1883 for line in text.splitlines(): 1878 if line == '-- ': 1884 1885 match = STRIP_RE.match(line) 1886 if match: 1887 self.logger.debug('\t"%s " matched, skiping rest of message' %line) 1879 1888 break 1889 1880 1890 body.append(line) 1881 1891 -
trunk/msg.txt
r72 r606 29 29 30 30 -- 31 --32 31 ******************************************************************** 33 32 * *
Note: See TracChangeset
for help on using the changeset viewer.