unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Carl Worth <cworth@cworth.org>
To: Tobias Waldekranz <tobias@waldekranz.com>
Cc: notmuch@notmuchmail.org
Subject: Thanks for notmuch-lore
Date: Mon, 21 Mar 2022 17:00:04 -0700	[thread overview]
Message-ID: <87mthiua9n.fsf@wondoo.home.cworth.org> (raw)
In-Reply-To: <8735l2b7ui.fsf@waldekranz.com>


[-- Attachment #1.1: Type: text/plain, Size: 1705 bytes --]

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.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



       reply	other threads:[~2022-03-22  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220131154655.1614770-1-tobias@waldekranz.com>
     [not found] ` <20220131154655.1614770-2-tobias@waldekranz.com>
     [not found]   ` <20220201170634.wnxy3s7f6jnmt737@skbuf>
     [not found]     ` <87a6fabbtb.fsf@waldekranz.com>
     [not found]       ` <20220201201141.u3qhhq75bo3xmpiq@skbuf>
     [not found]         ` <8735l2b7ui.fsf@waldekranz.com>
2022-03-22  0:00           ` Carl Worth [this message]
2022-03-22  5:15             ` Thanks for notmuch-lore Kyle Meyer
2022-03-22 17:00               ` Carl Worth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mthiua9n.fsf@wondoo.home.cworth.org \
    --to=cworth@cworth.org \
    --cc=notmuch@notmuchmail.org \
    --cc=tobias@waldekranz.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).