[Teammetrics-discuss] A basic (and broken!) mbox filter.

Sukhbir Singh sukhbir.in at gmail.com
Thu Aug 11 08:36:00 UTC 2011


Hi!

    git pull

You will see a file called mboxfiltersimple.py . To test it out, take
a mbox archive (unzipped) and pass it to the script as an argument.

There is only one problem left: If you notice that the lines between
the 'From' headers are not removed. The mbox module in Python's stdlib
provides no way to manipulate headers so we have to do it manually.

I think I have to write a regex to remove the lines in between the
>From headers or if you have a better idea, please share :)

Another approach is: Get the index of the first 'From' and then the
next 'From'. Then delete all lines in between!

Let me your results after testing this script and which approach you
want me to take.

-- 
Sukhbir



More information about the Teammetrics-discuss mailing list