This notebook count mails in a list of mailing lists


In [2]:
from bigbang.archive import load as load_archive

In [20]:
#insert a list of the urls of downloaded mailing lists that you want to include in the analysis. 
urls = ["http://mm.icann.org/pipermail/cc-humanrights/",
              "http://mm.icann.org/pipermail/euro-board/"]
       #"http://mm.icann.org/pipermail/wp4/"]
#       "http://mm.icann.org/pipermail/wp1/"]



name_archive = {}
arch_paths =[]
try:
    for url in urls:
        arch_paths.append('../archives/'+url[:-1].replace('://','_/')+'.csv')
    for arch_path in arch_paths:
        name_archive[arch_path] = load_archive(arch_path)
except:
    for url in urls:
        arch_paths.append('../archives/'+url[:-1].replace('//','/')+'.csv')
    for arch_path in arch_paths:
        name_archive[arch_path] = load_archive(arch_path)

In [25]:
for name, archive in name_archive.items():
    print('Mailing list '+name.split('/')[-1]+' contains '+str(len(archive.data))+' emails.')


Mailing list euro-board.csv contains 108 emails.
Mailing list cc-humanrights.csv contains 708 emails.

In [ ]: