Modify

Opened 14 years ago

Closed 12 years ago

#173 closed enhancement (fixed)

Extend email_quote to accept regexes

Reported by: samuel@… Owned by: bas
Priority: major Milestone: strip signature/quotes
Component: email2trac Version: 1.0.0
Keywords: Cc:

Description

Several email clients (importantly, including gmail) prefixes reply quotes with the line:

"On <date> <somebody> wrote:"

Email2trac is currently unable to strip this from messages using email_quote. However, this could easily be done by allowing email_quote to accept regular expressions.

The only modification necessary to make this work is to change line 1067 in email2trac.py.in:

  • if line.startswith(self.EMAIL_QUOTE):

+ if re.match(self.EMAIL_QUOTE, line):

Attachments (0)

Change History (4)

comment:1 Changed 14 years ago by samuel@…

I should have used a trac literal block in the summary.

Again, the modification necessary to make this work is to change line 1067 in email2trac.py.in:

-            if line.startswith(self.EMAIL_QUOTE):
+            if re.match(self.EMAIL_QUOTE, line):

comment:2 Changed 14 years ago by bas

  • Milestone set to strip signature/quotes
  • Status changed from new to assigned

Thanks for the suggestion and patch. I will rewrite the strip signature. There are many patches improvements, see Roadmap milestone:strip%20signature/quote

comment:4 Changed 12 years ago by bas

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [607]) email_quote can now handle regular expression, closes #173 -- This line, and those below, will be ignored--

M email2trac.py.in M ChangeLog?

Add Comment

Modify Ticket

Change Properties
Action
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.