datactive / bigbang

Scientific analysis of collaborative communities
http://datactive.github.io/bigbang/
MIT License
154 stars 51 forks source link

Make use of Python's email package for EmaiMessage types #434

Closed Christovis closed 3 years ago

Christovis commented 3 years ago

At the moment it seems that we can treat all messages from the current list of data sources as Python's EmailMessage objects without loss of important information. It's Pythonic and let's us take advantage of the existing work/gotchas of other Python people handling email This object should be made our default for messages from Mailman, W3C, LISTSERV, ... , from which e.g. .mbox can be created.

sbenthall commented 3 years ago

That's a good idea.

It looks like the mailbox package's Message object is a subclass of email.message EmailMessage object: https://docs.python.org/3/library/mailbox.html?highlight=mbox#mailbox.Message

though the documentation may be out of sync? I'm curious what precisely the relationship between these libraries are.

Christovis commented 3 years ago

This has been solved with #463