Thread View: gnu.emacs.gnus
2 messages
2 total messages
Started by Paul Sammy 4th Year iE/CES
Thu, 28 Jan 1993 13:01
converting rmail format to mh format
Author: Paul Sammy 4th Year iE/CES
Date: Thu, 28 Jan 1993 13:01
Date: Thu, 28 Jan 1993 13:01
18 lines
989 bytes
989 bytes
Hi.
I've just changed my default-article saver to save articles in the MH
format.
However, I've got quite a lot of articles in the rmail format that I'd
like to be able to view from the MH folder.
Is there such a thing as a rmail -> mh convertor?
It doesn`t need to be a emacs function.
Paul
--
Q: What's the difference between a | Internet: ssammy@cs.strath.ac.uk
circus and John Major's Cabinet? |
A: One is a cunning array of stunts. | JANET : ssammy@uk.ac.strath.cs
Re: converting rmail format to mh format
Author: Vivek Khera
Date: Thu, 28 Jan 1993 18:43
Date: Thu, 28 Jan 1993 18:43
62 lines
2623 bytes
2623 bytes
In article <SSAMMY.93Jan28130131@hunter-03.cs.strath.ac.uk> ssammy@cs.strath.ac.uk (Paul Sammy 4th Year iE/CES) writes:
I've just changed my default-article saver to save articles in the MH
format.
However, I've got quite a lot of articles in the rmail format that I'd
like to be able to view from the MH folder.
here's my program to do this. written in Perl. i call it babyl2mh.
after conversion, you must manually delete the rmail files you no
longer need.
--cut here--
#!/usr/gnu/bin/perl
# incorporate an RMAIL babyl file into an MH folder
#
# usage: babyl2mh +folder babyl-file
#
# V. Khera 17-JUL-1991
# $Id: babyl2mh,v 1.1 1991/07/17 18:23:39 khera Exp $
# where to find rcvstore
$rcvstore = "/usr/local/lib/mh/rcvstore";
#
# pull out command line args
#
die "usage: babyl2mh +folder babyl-file\n" unless @ARGV == 2;
$folder = shift;
# make sure folder name starts with a "+"
(substr($folder,0,1) eq "+") || (substr($folder,0,0) = "+");
$bfname = shift;
print "Incorporating RMAIL file $bfname into MH folder $folder\n";
#
# read in babyl file.
#
$/ = "\037"; # this separates the records in a babyl file
$* = 1; # records are multi-lines
open(BABYL,$bfname) || die "Couldn't open $bfname\n";
$_ = <BABYL>; # discard header.
$msgnum = 0;
while (<BABYL>) {
chop; # get rid of delimeter
s/\f(.|\n)*\*\*\* EOOH \*\*\*\n//; # remove duplicate header information
open(RCVSTORE,"|" . $rcvstore . " $folder");
print RCVSTORE $_;
$msgnum++;
print "Message $msgnum done.\n";
}
--cut here--
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Gradual Student/Systems Guy Department of Computer Science
Internet: khera@cs.duke.edu Box 90129
(MIME mail accepted) Durham, NC 27708-0129 (919)660-6528
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