From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.0.0.0/16 X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 37F471F852 for ; Wed, 12 Jan 2022 02:41:15 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1641955271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=naJs4usJxfy0ID6JXjSr5r52puQn28duXo4DA4xILiA=; b=oWlYaIgQ35z3+fHYrSKBj0jtsBhhLuGBedVqrjIXvqXDqHFWwAc3s1WiHKsjygxGxX6T5Y 0qyzCoGCD+Qn4UGajfFQBUIs4CPUT5nE9+MBYSk3mFQX544JavitYrC3F08sJ27yE4yamI Tb/0fYJO+thmWaapf4rB+FDtSMy4UbxW1FXFQ0CNgWsLMV5/Yk1L0cTdZnzxYdntGHWMTe ZPkgn1vFaF57Qov4r1MT9mzXWRsNv3y2/tHLr2PBepkeAtWKqC10FZpI97aHzyqGF8rnbL Ym5/y89LJIBq3sZSrdXSUy8m1tWNGgsVSyE1ApzXQkyY+ukkguI7SC1OFqgtvg== From: Kyle Meyer To: saifi@strikr.io Cc: meta@public-inbox.org Subject: Re: convert mail content in git repo to mbox format In-Reply-To: References: Date: Tue, 11 Jan 2022 21:41:03 -0500 Message-ID: <87o84hbrr4.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kyleam.com List-Id: 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 , 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/