On Tue, Feb 01 2022, Tobias Waldekranz wrote: > I actually gave up on getting my mailinglists from my email provider, > now I just download it directly from lore. I hacked together a script > that will scrape a public-inbox repo and convert it to a Maildir: > > https://github.com/wkz/notmuch-lore Thanks for sharing this, Tobias. I needed exactly this today, and was happy to have found this. It looks like you've coded something to efficiently do the work that's needed periodically, (fetch new emails from the public-inbox git repository, convert them to maildir files, and prune away git state other than a pointer to what's been converted already). What I'm missing is the piece to convert over the entire archive from the past. I can fetch it all easily enough with public-inbox-clone. Maybe what I want could be captured in a tool named something like: public-inbox-export --output=maildir After which I'd be all bootstrapped and ready to use your notmuch-lore pre-new hook. > As you can tell from the name, it is tailored for plugging into notmuch, > but the guts are pretty generic. Indeed. And it looks like all the code I would need for the export I described above is right there in your script. It's as simple as: git rev-list | while read sha; do $git show $sha:m > $maildir/new/$sha done So, next I should go put together a patch against public-inbox to add that. Thanks again, -Carl PS. I debated whether to CC lkml where the original message I was replying to was from originally. I decided against it and almost just emailed Tobias alone, but I really do want discussion like this to be archived in public. So I CCed the notmuch mailing list at least.