Commit Briefs

Omar Polo

build a cache of hashes for each thread

The idea is to use this cache to spot changed threads and re-export all the mail of the threads that changed. This will allow to add thread navigation hints on each exported mail and have them up-to-date. This makes the "skip if already exported" logic in mexp redundant and incomplete. pe will decide whether to export or not, and mexp blindly do the work.


Omar Polo

"humanize" the attachment size


Omar Polo

woops, don't extract if already did


Omar Polo

don't rely on filter-export anymore

Instead, parse the output of `mshow -t' and extract, one by one, the interesting parts. This allows to generate a better listing (we know name and size!) and to decide how to call the files (the extension is important for httpd!)


Omar Polo

urlencode the mail/thread id

reminded by semarie@, thanks!


Omar Polo

specify why it's not using tmppath pledge promise

in theory `mexp' could use the tmppath pledge promise and drop unveil("/tmp/", "rwc") BUT File::Temp checks whether /tmp exists. Another option would be to unveil("/tmp", "r") and use tmppath, but that could seem misleading. (noticed after semarie@ reminded me of `tmppath')


Omar Polo

state the license on each file



Omar Polo

fix the Date header on the raw email too

while here also drops a useless chomp



Omar Polo

create temp files in /tmp and don't allow writes to "."

there's little point to use pledge/unveil and then allow the program to modify itself...




Omar Polo

refactor the parsing into the module

change the mscan format string to siplify the parsing, and refactor the parsing code into the module for reuse. pe is an exception in that it doesn't care about the format string, it just need to decide if the current line starts a new thread or not, that's why it doesn't use the newly introduced `parse'. The new format simplifies pe too though.


Omar Polo

mexp: defer skip test after $tid is set

otherwise we run with an undef $tid when processing new replies to existing threads.