Thread View: news.software.readers
5 messages
5 total messages
Started by Denis McKeon
Sun, 24 Nov 1996 00:00
Re: changing trn news headers to mail headers
Author: Denis McKeon
Date: Sun, 24 Nov 1996 00:00
Date: Sun, 24 Nov 1996 00:00
99 lines
4521 bytes
4521 bytes
[followup both posted and mailed to poster,]
[and cross-posted to news.software.readers]
In <574ei5$nmn@lynx.dac.neu.edu> zbrown@lynx.dac.neu.edu wrote:
>I've been archiving usenet threads I participate in, for a few years now.
>I use trn, and when it starts an archive, it always asks me if I want to
>use mailbox format. For years I said no. Now I not only want to say yes,
>but I want to have said yes from the beginning. How can I translate those
>news archives so that formail can process them?
Can't you just send the archive file through formail?:
formail < archive > mbox
It works for me if we're talking about a file like this:
Article: 2514 of comp.mail.headers
Path: sloth.swcp.com!tesuque.cs.sandia.gov!lynx.unm.edu!chaos.aoc.nrao.edu!newshost.nmt.edu!rutgers!goliath.montclair.edu!newsserver.jvnc.net!news.edu.tw!news-peer.gsl.net!news.gsl.net!news.mathworks.com!uunet!in2.uu.net!gail.ripco.com!nntp.neu.edu!not-for-mail
From: zbrown@lynx.dac.neu.edu (zachary brown)
Newsgroups: comp.mail.headers
Subject: changing trn news headers to mail headers
Date: 22 Nov 1996 09:49:41 -0500
Organization: Northeastern University, Boston, MA, USA
Lines: 10
Message-ID: <574ei5$nmn@lynx.dac.neu.edu>
NNTP-Posting-Host: lynx.dac.neu.edu
I've been archiving usenet threads I participate in, for a few years now.
...
Although I would probably do it as:
formail -czYbq -I Path -I Article -I Lines < archive > mbox
producing:
From zbrown@lynx.dac.neu.edu Sun Nov 24 09:22:48 1996
From: zbrown@lynx.dac.neu.edu (zachary brown)
Newsgroups: comp.mail.headers
Subject: changing trn news headers to mail headers
Date: 22 Nov 1996 09:49:41 -0500
Organization: Northeastern University, Boston, MA, USA
Message-ID: <574ei5$nmn@lynx.dac.neu.edu>
NNTP-Posting-Host: lynx.dac.neu.edu
I've been archiving usenet threads I participate in, for a few years now.
...
On a related topic, here's a way to get trn to create archives in
BSD/mbox format to - basically, have trn flog up a 'From ' line, and
have the saver script echo it:
In the initialization file, or in your environment:
-EMBOXSAVER='%X/my-mbox.saver %A %P %c %a %B %C "%b" "From %t %[Date]"'
in the mbox.saver file:
#!/bin/sh
# $Id: mbox.saver.SH,v 3.0 1991/09/09 20:23:31 davison Trn $
#
# This software is Copyright 1991 by Stan Barber.
#
# modified by Denis McKeon Dec 1994
# Permission is hereby granted to copy, reproduce, redistribute or otherwise
# use this software as long as: there is no monetary profit gained
# specifically from the use or reproduction of this software, it is not
# sold, rented, traded or otherwise marketed, and this copyright notice is
# included prominently in any copy made.
#
# The author make no claims as to the fitness or correctness of this software
# for any use whatsoever, and it is provided as is. Any use of this software
# is at the user's own risk.
#
# Arguments:
# 1 Full name of article (%A)
# 2 Public news spool directory (%P)
# 3 Directory of current newsgroup (%c)
# 4 Article number (%a)
# 5 Where in article to start (%B)
# 6 Newsgroup name (%C)
# 7 Save destination (%b)
# 8 First line of message, normally From...
#
export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$)
( /bin/echo "$8"
/usr/ucb/tail +$5c $1 | /bin/sed "s/^From />From /"
/bin/echo ""
/bin/echo "" ) >> $7
If there's an easier way to do that, I'd be happy to hear about it.
--
Denis McKeon
dmckeon@swcp.com
Re: changing trn news headers to mail headers
Author: zachary brown
Date: Sun, 24 Nov 1996 00:00
Date: Sun, 24 Nov 1996 00:00
28 lines
1702 bytes
1702 bytes
In article <579t0s$a31@sloth.swcp.com>, Denis McKeon <dmckeon@swcp.com> wrote: |[followup both posted and mailed to poster,] |[and cross-posted to news.software.readers] | |In <574ei5$nmn@lynx.dac.neu.edu> zbrown@lynx.dac.neu.edu wrote: |>I've been archiving usenet threads I participate in, for a few years now. |>I use trn, and when it starts an archive, it always asks me if I want to |>use mailbox format. For years I said no. Now I not only want to say yes, |>but I want to have said yes from the beginning. How can I translate those |>news archives so that formail can process them? | |Can't you just send the archive file through formail?: | | formail < archive > mbox The only effect that seems to have is to put a From line at the top of the file. But as there are hundreds of articles in each file, that won't be enough. Also, the from line is listed as foo@bar only, followed by the current date. What I need is for each article in the archive file to have its header modified to be a mail header. Zack
Re: changing trn news headers to mail headers
Author: Per Hedeland
Date: Sun, 24 Nov 1996 00:00
Date: Sun, 24 Nov 1996 00:00
14 lines
1084 bytes
1084 bytes
In article <579t0s$a31@sloth.swcp.com> dmckeon@swcp.com (Denis McKeon) writes: >On a related topic, here's a way to get trn to create archives in >BSD/mbox format to - basically, have trn flog up a 'From ' line, and >have the saver script echo it: ... >If there's an easier way to do that, I'd be happy to hear about it. How about giving trn the '-M' option...?:-) --Per Hedeland per@erix.ericsson.se
Re: changing trn news headers to mail headers
Author: Denis McKeon
Date: Mon, 25 Nov 1996 00:00
Date: Mon, 25 Nov 1996 00:00
20 lines
1461 bytes
1461 bytes
[followup both posted and mailed to poster] In <57ck6r$oqp@sloth.swcp.com> jrredho@swcp.com wrote: >In article <579t0s$a31@sloth.swcp.com>, dmckeon@swcp.com wrote: >> >>On a related topic, here's a way to get trn to create archives in >>BSD/mbox format to - basically, have trn flog up a 'From ' line, and >>have the saver script echo it: > >Isn't this what the -M command-line option does already? Almost: -M creates a 'From ' that has the time the message was saved by trn, rather than the time that the message was sent (like Date:). -- Denis McKeon dmckeon@swcp.com
Re: changing trn news headers to mail headers
Author: John Red-Horse
Date: Mon, 25 Nov 1996 00:00
Date: Mon, 25 Nov 1996 00:00
14 lines
926 bytes
926 bytes
In article <579t0s$a31@sloth.swcp.com>, dmckeon@swcp.com wrote: > >On a related topic, here's a way to get trn to create archives in >BSD/mbox format to - basically, have trn flog up a 'From ' line, and >have the saver script echo it: > Isn't this what the -M command-line option does already? cheers, john
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads