Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3c0942c49 | ||
|
|
02adf53ab9 |
2
setup.py
2
setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
|
|
||||||
setup(name='talon',
|
setup(name='talon',
|
||||||
version='1.2.4',
|
version='1.2.5',
|
||||||
description=("Mailgun library "
|
description=("Mailgun library "
|
||||||
"to extract message quotations and signatures."),
|
"to extract message quotations and signatures."),
|
||||||
long_description=open("README.rst").read(),
|
long_description=open("README.rst").read(),
|
||||||
|
|||||||
@@ -148,7 +148,9 @@ SPLITTER_PATTERNS = [
|
|||||||
re.compile("\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}\s+GMT.*@", re.S),
|
re.compile("\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}\s+GMT.*@", re.S),
|
||||||
# Thu, 26 Jun 2014 14:00:51 +0400 Bob <bob@example.com>:
|
# Thu, 26 Jun 2014 14:00:51 +0400 Bob <bob@example.com>:
|
||||||
re.compile('\S{3,10}, \d\d? \S{3,10} 20\d\d,? \d\d?:\d\d(:\d\d)?'
|
re.compile('\S{3,10}, \d\d? \S{3,10} 20\d\d,? \d\d?:\d\d(:\d\d)?'
|
||||||
'( \S+){3,6}@\S+:')
|
'( \S+){3,6}@\S+:'),
|
||||||
|
# Sent from Samsung MobileName <address@example.com> wrote:
|
||||||
|
re.compile('Sent from Samsung .*@.*> wrote')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,19 @@ On 11-Apr-2011, at 6:54 PM, Roman Tkachenko <romant@example.com> wrote:
|
|||||||
eq_("Test reply", quotations.extract_from_plain(msg_body))
|
eq_("Test reply", quotations.extract_from_plain(msg_body))
|
||||||
|
|
||||||
|
|
||||||
|
def test_pattern_sent_from_samsung_smb_wrote():
|
||||||
|
msg_body = """Test reply
|
||||||
|
|
||||||
|
Sent from Samsung MobileName <address@example.com> wrote:
|
||||||
|
|
||||||
|
>
|
||||||
|
> Test
|
||||||
|
>
|
||||||
|
> Roman"""
|
||||||
|
|
||||||
|
eq_("Test reply", quotations.extract_from_plain(msg_body))
|
||||||
|
|
||||||
|
|
||||||
def test_pattern_on_date_wrote_somebody():
|
def test_pattern_on_date_wrote_somebody():
|
||||||
eq_('Lorem', quotations.extract_from_plain(
|
eq_('Lorem', quotations.extract_from_plain(
|
||||||
"""Lorem
|
"""Lorem
|
||||||
|
|||||||
Reference in New Issue
Block a user