email_reply_trimmer 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c1775e4e0a1b418c22fdf6fc1da9bd93a3a8268
4
- data.tar.gz: e09d01ec6ea545f5e513156d229959e9b86edfc2
3
+ metadata.gz: 6b811566baddd01572925692005213b5c6818ddd
4
+ data.tar.gz: f3bf620c832f78d05644e65ddcfc96def645d45e
5
5
  SHA512:
6
- metadata.gz: 30e1561b7e5b6ee4b6f6026b46fe5d41a6242a44515612c0fdbad0e708cc2fbc563aa83e1511e2526d6bcc1b2626007b2752a90d29217131188a4436983f6796
7
- data.tar.gz: 31999706dc435986dc80490f9f88747cb0aace1c27d02872f3f9b7cc671a9ff9efef9669cd4c67be35bbc0695e4deb2d852e17bd39ba73cf30fabd7be4aacd33
6
+ metadata.gz: 091e91ca51915f1c129b17774e69f314baa092d02cde3048fa8437250554d6cd37390c06b9693a37a8d9be6f6ee73ce690399d7530958e9d2178356b74458a89
7
+ data.tar.gz: 86b8cffde68a6c8d7470b5514574733420afa908161087700aad494cd88fa32c232b03bc31607c166b57e7808cd3c8f109ddc25f0ef17c3e116e174b8f5e40b9
@@ -6,7 +6,7 @@ require_relative "email_reply_trimmer/email_header_matcher"
6
6
  require_relative "email_reply_trimmer/quote_matcher"
7
7
 
8
8
  class EmailReplyTrimmer
9
- VERSION = "0.1.1"
9
+ VERSION = "0.1.2"
10
10
 
11
11
  DELIMITER = "d"
12
12
  EMBEDDED = "b"
@@ -18,6 +18,8 @@ class EmbeddedEmailMatcher
18
18
  ["On", "wrote"],
19
19
  # French
20
20
  ["Le", "a écrit "],
21
+ # Italian
22
+ ["Il", "ha scritto"],
21
23
  # Polish
22
24
  ["Dnia", "napisał\\(a\\)"],
23
25
  # Portuguese
@@ -27,6 +27,8 @@ class SignatureMatcher
27
27
  # German
28
28
  /^[[:space:]]*Von meinem .+ gesendet/i,
29
29
  /^[[:space:]]*Diese Nachricht wurde von .+ gesendet/i,
30
+ # Spanish
31
+ /^[[:space:]]*Enviado desde mi .+/i,
30
32
  ]
31
33
 
32
34
  def self.match?(line)
@@ -0,0 +1,27 @@
1
+ > Il 26 marzo 2016 alle 13.16 Sam Saffron <info@discourse.org> ha scritto:
2
+ >
3
+ >
4
+ >
5
+ >
6
+ >
7
+ > We need specific examples of failures, PM full source of emails to
8
+ > @zogstrip
9
+ >
10
+ > Posted by sam on 03/26/2016
11
+ >
12
+ >
13
+ >
14
+ >
15
+ >
16
+ >
17
+ > ---
18
+ > [Visit Topic](https://meta.discourse.org/t/email-reply-parsing/41597/2)
19
+ > or reply to this email to respond
20
+ >
21
+ > To stop receiving notifications for this particular topic, [click
22
+ > here](https://meta.discourse.org/t/email-reply-parsing/41597/unsubscribe).
23
+ > To unsubscribe from these emails, change your [user
24
+ > preferences](https://meta.discourse.org/my/preferences)
25
+
26
+ Stefano Costa @stekosteko
27
+ Editor, Journal of Open Archaeology Data
@@ -0,0 +1,31 @@
1
+ Ok, will do. As a test, this is a reply from a webmail client.
2
+
3
+
4
+ > Il 26 marzo 2016 alle 13.16 Sam Saffron <info@discourse.org> ha scritto:
5
+ >
6
+ >
7
+ >
8
+ >
9
+ >
10
+ > We need specific examples of failures, PM full source of emails to
11
+ > @zogstrip
12
+ >
13
+ > Posted by sam on 03/26/2016
14
+ >
15
+ >
16
+ >
17
+ >
18
+ >
19
+ >
20
+ > ---
21
+ > [Visit Topic](https://meta.discourse.org/t/email-reply-parsing/41597/2)
22
+ > or reply to this email to respond
23
+ >
24
+ > To stop receiving notifications for this particular topic, [click
25
+ > here](https://meta.discourse.org/t/email-reply-parsing/41597/unsubscribe).
26
+ > To unsubscribe from these emails, change your [user
27
+ > preferences](https://meta.discourse.org/my/preferences)
28
+
29
+ --
30
+ Stefano Costa @stekosteko
31
+ Editor, Journal of Open Archaeology Data
@@ -0,0 +1 @@
1
+ Ok, will do. As a test, this is a reply from a webmail client.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: email_reply_trimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Régis Hanol
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-07 00:00:00.000000000 Z
11
+ date: 2016-03-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: EmailReplyTrimmer is a small library to trim replies from plain text
14
14
  email.
@@ -52,6 +52,7 @@ files:
52
52
  - test/elided/embedded_email_german_1.txt
53
53
  - test/elided/embedded_email_german_2.txt
54
54
  - test/elided/embedded_email_german_3.txt
55
+ - test/elided/embedded_email_italian.txt
55
56
  - test/elided/embedded_email_polish.txt
56
57
  - test/elided/embedded_email_portuguese.txt
57
58
  - test/elided/embedded_email_quote_text.txt
@@ -89,6 +90,7 @@ files:
89
90
  - test/emails/embedded_email_german_1.txt
90
91
  - test/emails/embedded_email_german_2.txt
91
92
  - test/emails/embedded_email_german_3.txt
93
+ - test/emails/embedded_email_italian.txt
92
94
  - test/emails/embedded_email_polish.txt
93
95
  - test/emails/embedded_email_portuguese.txt
94
96
  - test/emails/embedded_email_quote_text.txt
@@ -127,6 +129,7 @@ files:
127
129
  - test/trimmed/embedded_email_german_1.txt
128
130
  - test/trimmed/embedded_email_german_2.txt
129
131
  - test/trimmed/embedded_email_german_3.txt
132
+ - test/trimmed/embedded_email_italian.txt
130
133
  - test/trimmed/embedded_email_polish.txt
131
134
  - test/trimmed/embedded_email_portuguese.txt
132
135
  - test/trimmed/embedded_email_quote_text.txt