Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Andreas Seltenreich <andreas+news.geg@gate450.dyndns.org>
Subject: Re: How to export nnml group to mbox file?
Date: Wed, 29 Nov 2006 19:03:52 +0100	[thread overview]
Message-ID: <87r6vm5dvb.fsf@gate450.dyndns.org> (raw)
In-Reply-To: <g697ixeb2md.fsf@lifelogs.com>

Ted Zlatanov writes:

> (while Gnus can copy/move the articles natively, it's nice to
> understand how to do the job from the command line)

Ack, it is also much faster than Gnus could ever be.  Batch processing
isn't its forte.

> You should be able to just do "cat * > mbox_file" I think.  But you
> need a blank line at the end of every message, so this should work:
>
> ls | perl -ne 'chomp; open F, $_; print <F>; print "\n";' > mbox_file

I think this would break since Gnus rewrites the From_ lines into
X-From-Line headers and did From-unescaping.

I found the following command in my .bash_history:

--8<---------------cut here---------------start------------->8---
for f in nnml/foo/*; do
    sed '1s/^X-From-Line:/From/;/^$/,$s/^>*From />&/' $f;
done > ~/mymbox
--8<---------------cut here---------------end--------------->8---

...which resulted in an mbox in MBOXRD format.

regards,
andreas

  reply	other threads:[~2006-11-29 18:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-28 21:48 Jochem Huhmann
2006-11-28 22:46 ` Leo
     [not found] ` <mailman.1264.1164754052.2155.info-gnus-english@gnu.org>
2006-11-28 23:58   ` Jochem Huhmann
2006-11-29 21:50     ` Reiner Steib
2006-11-30  0:14       ` Jochem Huhmann
2006-11-30 21:45         ` Reiner Steib
2006-11-29  8:08 ` Oliver Heins
2006-11-29 11:36   ` Jochem Huhmann
2006-11-29 17:10 ` Ted Zlatanov
2006-11-29 18:03   ` Andreas Seltenreich [this message]
2006-11-29 18:22   ` Jochem Huhmann

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

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

  git send-email \
    --in-reply-to=87r6vm5dvb.fsf@gate450.dyndns.org \
    --to=andreas+news.geg@gate450.dyndns.org \
    /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.
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 NNTP newsgroup(s).