david@wubios.wustl.edu (David J. Camp) (04/08/91)
Here is an upgrade to the 'digest' program. It will convert a mail
digest to a folder, and run elm on that folder. It is intended to be
run via the command "|digest" from the elm menu.
Most improvements to this program have been due to bug reports by one
user. If anyone else is using digest, I would like to hear from you.
I want digest to support all existing digest formats. If you
encounter a digest on which it fails, please uuencode and send to me.
Thanks, -David-
#! /usr/bin/perl
# Modified: 7 April 1991
#
# This is 'digest' a program to run elm on a digest as a folder.
# Copyright (C) 1990-1991 David J. Camp
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 1, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# david@wubios.wustl.edu ^ Mr. David J. Camp
# david%wubios@wugate.wustl.edu < * > +1 314 382 0584
# ...!uunet!wugate!wubios!david v "God loves material things."
#
# from the elm menu, type |digest<return>
#
if (-t STDIN)
{
print STDERR "Usage: \"|digest\" from elm menu\n";
exit 3;
}
$| = 1;
open (FOLDER, ">/tmp/dig$$");
while (<>)
{
if (/(^\([0-9]*\) |^--)----(\n|-----------------------(\n|-(\n|-------------------------(\n|---------------\n))))/)
{
$break = $_;
$_ = "";
for ($ctr = 0; ! (eof() || /[\041-\177]/); $ctr++)
{
$_ = <>;
}
if (/^[^ \t\r\n]+: /)
{
print FOLDER "From dummy Wed Feb 29 12:12:12 1990\n";
}
else
{
print FOLDER $break;
for ($ctr--; $ctr > 0; $ctr--)
{
print "\n";
}
}
}
print FOLDER $_;
}
close (FOLDER);
exec ("elm -f /tmp/dig$$ <&2 ; /bin/rm -f /tmp/dig$$");germuska@casbah.acns.nwu.edu (Joe Germuska) (04/12/91)
I didn't quite understand this post, since it refers to a program I didn't know existed... Does it make digests from mail? or make mail from digests? It sounded like the latter, but I'll admit I don't know why you'd want to do that... If it's the former, could some-one send me details? My mailing list is in urgent need of a digestifier program, and I don't have the... er, wherewithal to write one! Help if you can, Thanks in advance, Joe -- |----Joe Germuska | germuska@casbah.acns.nwu.edu | ---- (708) 864-5939 ---| |-Join the Peter Gabriel Mailing List:gabriel-request@casbah.acns.nwu.edu-| |"Old men sing about their dreams, women laugh and |"How can we be in when| |children scream, and the band keeps playin' on..."|there is no outside?"-|