fastemailparser 0.2.0__tar.gz → 0.2.1__tar.gz

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.
Files changed (27) hide show
  1. {fastemailparser-0.2.0/fastemailparser.egg-info → fastemailparser-0.2.1}/PKG-INFO +9 -1
  2. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/README.md +8 -0
  3. {fastemailparser-0.2.0 → fastemailparser-0.2.1/fastemailparser.egg-info}/PKG-INFO +9 -1
  4. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/setup.py +1 -1
  5. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/headers.c +13 -9
  6. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/LICENSE +0 -0
  7. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/MANIFEST.in +0 -0
  8. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/email.h +0 -0
  9. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/emailparser.c +0 -0
  10. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/fastemailparser.egg-info/SOURCES.txt +0 -0
  11. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/fastemailparser.egg-info/dependency_links.txt +0 -0
  12. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/fastemailparser.egg-info/top_level.txt +0 -0
  13. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/setup.cfg +0 -0
  14. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/body.c +0 -0
  15. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/body.h +0 -0
  16. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/buf.h +0 -0
  17. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/email_iter.c +0 -0
  18. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/email_iter.h +0 -0
  19. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/headers.h +0 -0
  20. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/html.c +0 -0
  21. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/html.h +0 -0
  22. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/mime.c +0 -0
  23. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/mime.h +0 -0
  24. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/signature.c +0 -0
  25. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/signature.h +0 -0
  26. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/standalone.c +0 -0
  27. {fastemailparser-0.2.0 → fastemailparser-0.2.1}/src/standalone.h +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastemailparser
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Very fast email parsing tool, split emails, retrieve headers & signatures
5
5
  Home-page: https://github.com/Methode-dev/EmailParser
6
6
  Author: Julien Calenge @ Méthode
@@ -291,6 +291,14 @@ Extracts the header fields from any segment string.
291
291
  | `"bcc"` | `list[str]` | `[]` |
292
292
  | `"subject"` | `str \| None` | `None` |
293
293
  | `"date"` | `str \| None` | `None` |
294
+ | `"message-id"` | `str \| None` | `None` |
295
+ | `"thread-index"` | `str \| None` | `None` |
296
+ | `"thread-topic"` | `str \| None` | `None` |
297
+
298
+ `message-id`, `thread-index`, and `thread-topic` are present in the outermost
299
+ MIME header block and are therefore most useful via `email.outer_headers`.
300
+ Inner quoted segments rarely carry these fields, so they will return `None`
301
+ for most `parse_headers()` calls on segments 1, 2, …
294
302
 
295
303
  Recognised field names (case-insensitive):
296
304
 
@@ -270,6 +270,14 @@ Extracts the header fields from any segment string.
270
270
  | `"bcc"` | `list[str]` | `[]` |
271
271
  | `"subject"` | `str \| None` | `None` |
272
272
  | `"date"` | `str \| None` | `None` |
273
+ | `"message-id"` | `str \| None` | `None` |
274
+ | `"thread-index"` | `str \| None` | `None` |
275
+ | `"thread-topic"` | `str \| None` | `None` |
276
+
277
+ `message-id`, `thread-index`, and `thread-topic` are present in the outermost
278
+ MIME header block and are therefore most useful via `email.outer_headers`.
279
+ Inner quoted segments rarely carry these fields, so they will return `None`
280
+ for most `parse_headers()` calls on segments 1, 2, …
273
281
 
274
282
  Recognised field names (case-insensitive):
275
283
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastemailparser
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Very fast email parsing tool, split emails, retrieve headers & signatures
5
5
  Home-page: https://github.com/Methode-dev/EmailParser
6
6
  Author: Julien Calenge @ Méthode
@@ -291,6 +291,14 @@ Extracts the header fields from any segment string.
291
291
  | `"bcc"` | `list[str]` | `[]` |
292
292
  | `"subject"` | `str \| None` | `None` |
293
293
  | `"date"` | `str \| None` | `None` |
294
+ | `"message-id"` | `str \| None` | `None` |
295
+ | `"thread-index"` | `str \| None` | `None` |
296
+ | `"thread-topic"` | `str \| None` | `None` |
297
+
298
+ `message-id`, `thread-index`, and `thread-topic` are present in the outermost
299
+ MIME header block and are therefore most useful via `email.outer_headers`.
300
+ Inner quoted segments rarely carry these fields, so they will return `None`
301
+ for most `parse_headers()` calls on segments 1, 2, …
294
302
 
295
303
  Recognised field names (case-insensitive):
296
304
 
@@ -28,7 +28,7 @@ module = Extension(
28
28
 
29
29
  setup(
30
30
  name="fastemailparser",
31
- version="0.2.0",
31
+ version="0.2.1",
32
32
  author="Julien Calenge @ Méthode",
33
33
  author_email="julien.calenge@methode.dev",
34
34
  description="Very fast email parsing tool, split emails, retrieve headers & signatures",
@@ -25,11 +25,13 @@ const char *canonical_key(const char *name, size_t len) {
25
25
  const char *raw;
26
26
  const char *key;
27
27
  } MAP[] = {
28
- {"from", "from"}, {"reply-to", "from"}, {"to", "to"},
29
- {"cc", "cc"}, {"bcc", "bcc"}, {"subject", "subject"},
30
- {"date", "date"}, {"sent", "date"}, {"de", "from"},
31
- {"a", "to"}, {"\xc3\x80", "to"}, {"\xc3\xa0", "to"},
32
- {"objet", "subject"}, {"cci", "bcc"}, {"envoy\xc3\xa9", "date"},
28
+ {"from", "from"}, {"reply-to", "from"}, {"to", "to"},
29
+ {"cc", "cc"}, {"bcc", "bcc"}, {"subject", "subject"},
30
+ {"date", "date"}, {"sent", "date"}, {"de", "from"},
31
+ {"a", "to"}, {"\xc3\x80", "to"}, {"\xc3\xa0", "to"},
32
+ {"objet", "subject"}, {"cci", "bcc"}, {"envoy\xc3\xa9", "date"},
33
+ {"message-id", "message-id"}, {"thread-index", "thread-index"},
34
+ {"thread-topic", "thread-topic"},
33
35
  {NULL, NULL}};
34
36
  char lower[64];
35
37
  size_t n;
@@ -176,12 +178,14 @@ PyObject *py_parse_headers(PyObject *module, PyObject *args) {
176
178
  * all content is quoted-printable decoded before parsing.
177
179
  * lines are scanned until the first blank line (header/body separator).
178
180
  *
179
- * return: Python dict with keys "from", "to", "cc", "bcc",
180
- * "subject", "date" (string fields default to None,
181
- * list fields default to [])
181
+ * return: Python dict with keys "from", "to", "cc", "bcc", "subject",
182
+ * "date", "message-id", "thread-index", "thread-topic"
183
+ * (string fields default to None, list fields default to [])
182
184
  */
183
185
  static const char *LIST_KEYS[] = {"to", "cc", "bcc", NULL};
184
- static const char *STR_KEYS[] = {"from", "subject", "date", NULL};
186
+ static const char *STR_KEYS[] = {
187
+ "from", "subject", "date", "message-id", "thread-index",
188
+ "thread-topic", NULL};
185
189
  const char *text;
186
190
  Py_ssize_t text_len;
187
191
  int is_html;
File without changes
File without changes