unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* convert mail content in git repo to mbox format
@ 2022-01-07 11:38 SAIFI
  2022-01-12  2:41 ` Kyle Meyer
  0 siblings, 1 reply; 3+ messages in thread
From: SAIFI @ 2022-01-07 11:38 UTC (permalink / raw)
  To: meta

Hi:

public-inbox is a wonderful project with lots of capabilities, path breaking ideas, amazing interfaces and awesome contributors.

Now here is a very simple question (please don't tell me maildir, scripts dir etc etc, have spent 3+ hrs trawling through website and archives).

I have read this discussion thread
https://yhetil.org/meta/22947b1d-4728-30fa-ee96-fbd31496c0e6@gmx.at/T/#r8d12a02091311f1d8a7eae01dfaf873415d6b439

I use alpine 2.24 and mbox format works great for me and for the 600GB mail archives without any problems till date. so 'mbox' it is for me.

As an example, let's consider this mailing list archive.

git clone --mirror http://lore.kernel.org/connman/0 connman/git/0.git

Q: How do i convert the mail content trapped in the git repo to mbox format ?

Is there a solution ? script ? Any pointers ?


warm regards
Saifi.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: convert mail content in git repo to mbox format
  2022-01-07 11:38 convert mail content in git repo to mbox format SAIFI
@ 2022-01-12  2:41 ` Kyle Meyer
  2022-01-12  8:16   ` SAIFI
  0 siblings, 1 reply; 3+ messages in thread
From: Kyle Meyer @ 2022-01-12  2:41 UTC (permalink / raw)
  To: saifi; +Cc: meta

SAIFI writes:

> Now here is a very simple question (please don't tell me maildir,
> scripts dir etc etc, have spent 3+ hrs trawling through website and
> archives).
>
> I have read this discussion thread
> https://yhetil.org/meta/22947b1d-4728-30fa-ee96-fbd31496c0e6@gmx.at/T/#r8d12a02091311f1d8a7eae01dfaf873415d6b439
>
> I use alpine 2.24 and mbox format works great for me and for the 600GB
> mail archives without any problems till date. so 'mbox' it is for me.
>
> As an example, let's consider this mailing list archive.
>
> git clone --mirror http://lore.kernel.org/connman/0 connman/git/0.git
>
> Q: How do i convert the mail content trapped in the git repo to mbox format ?
>
> Is there a solution ? script ? Any pointers ?

Here's a slight variation of the recipe from the link you mentioned.
The main functional difference is that each message is converted to
mboxrd (via mblaze's mexport [1]):

  #!/bin/sh
  
  for commit in $(git -C connman/git/0.git rev-list master)
  do
      git -C connman/git/0.git cat-file blob $commit:m | mexport -
  done >mbox

If you want a one-time import, I think that could work okay, though it
wouldn't work well for augmenting an existing mbox.

Also, if a one-time import is what you're after (particularly with a
small inbox like connman), you could get by with the all.mbox.tar.gz
endpoint:

  $ curl -SfsL https://lore.kernel.org/connman/all.mbox.gz | \
    zcat >conman-mbox

For regular updates from <https://lore.kernel.org/connman>, you might be
interested in trying out lei (new in public-inbox 1.7.0).

  $ lei q -O https://lore.kernel.org/connman -o mboxrd:conman-lei-mbox \
    -a d:30.days.ago..
  # /usr/bin/curl -Sf -s -d '' https://lore.kernel.org/connman/?x=m&q=dt%3A20211213023449..
  # https://lore.kernel.org/connman/ 14/14
  # 14 written to conman-lei-mbox (14 matches)

  $ lei up conman-lei-mbox

[1] https://git.vuxu.org/mblaze/about/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: convert mail content in git repo to mbox format
  2022-01-12  2:41 ` Kyle Meyer
@ 2022-01-12  8:16   ` SAIFI
  0 siblings, 0 replies; 3+ messages in thread
From: SAIFI @ 2022-01-12  8:16 UTC (permalink / raw)
  To: meta

On Tue, 11 Jan 2022, Kyle Meyer wrote:

>
>  $ curl -SfsL https://lore.kernel.org/connman/all.mbox.gz | \
>    zcat >conman-mbox
>

Kyle thanks for your reply. It really helped me understand how to access the multiple end-points.

'curl' based approach addresses the one-time update/seed requirement for an mbox archive.


warm regards
Saifi.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-12  8:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 11:38 convert mail content in git repo to mbox format SAIFI
2022-01-12  2:41 ` Kyle Meyer
2022-01-12  8:16   ` SAIFI

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).