[comp.mail.elm] perl-based de-digestifier

david@wubios.wustl.edu (David J. Camp) (10/15/90)

I have a home-grown perl-based de-digestifier using elm.
To use it, just pipe a message containing a digest to the
'elmdigest' command.  You will find yourself in an elm
session on a temporary file with each message split into
a separate entity.  The temporary file is deleted when you
exit.

I will accept requests for copies.  -David-

david@wubios.wustl.edu                 ^        Mr. David J. Camp
david%wubios@wugate.wustl.edu        < * >      +1 314 382 0584
...!uunet!wugate!wubios!david          v
                                            "White light makes me stupid."

rob@mtdiablo.Concord.CA.US (Rob Boldbear) (10/16/90)

In article <1990Oct15.093829.9705@wubios.wustl.edu> david@wubios.wustl.edu (David J. Camp) writes:
>I have a home-grown perl-based de-digestifier using elm.
>To use it, just pipe a message containing a digest to the
>'elmdigest' command.  You will find yourself in an elm
>session on a temporary file with each message split into
>a separate entity.  The temporary file is deleted when you
>exit.

Um. I didn't think there was a standard way that digests used to
separate component articles.
-- 
Rob Bernardo                             Mt. Diablo Software Solutions    _ /
email: rob@mtdiablo.Concord.CA.US        phone: (415) 827-4301           <_/><
S0/8 b-/+ g- l y- z- n o a-- u+ v-- j-   P6   B3 f+ t- dvcv sv w- m+ r+ p / 
	    "There is no right 'not to be offended'." -Bob Culmer

david@wuarchive.wustl.edu (David Camp) (11/04/90)

In article <1990Oct16.135736.3326@mtdiablo.Concord.CA.US> rob@mtdiablo.Concord.CA.US (Rob Boldbear) writes:
>In article <1990Oct15.093829.9705@wubios.wustl.edu> david@wubios.wustl.edu (David J. Camp) writes:
>>I have a home-grown perl-based de-digestifier using elm.
[text deleted]
>Um. I didn't think there was a standard way that digests used to
>separate component articles.

That is true, and the dedigestifier fails in some cases.  If users
will document failure modes, (i.e. forward the problematic digests
to me), I will try to accomodate them with special-case improvements
to elmdigest.   

I am including the elmdigest program below.  It requires perl
to be installed.  To use it, just type:

    |elmdigest

from the elm menu prompt.  You will find yourself in an elm session
on a temporary folder containing individual messages from the digest.
The folder will bes deleted when you exit elmdigest.  -David-

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."

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  elmdigest dedigest
# Wrapped by david@wubios on Tue Oct 16 12:35:30 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'elmdigest' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'elmdigest'\"
else
echo shar: Extracting \"'elmdigest'\" \(1154 characters\)
sed "s/^X//" >'elmdigest' <<'END_OF_FILE'
X#! /bin/sh
X#    This is 'elmdigest', a program to view a folder made from a digest.
X#    Copyright (C) 1990  David J. Camp
X#
X#    This program is free software; you can redistribute it and/or modify
X#    it under the terms of the GNU General Public License as published by
X#    the Free Software Foundation; either version 1, or (at your option)
X#    any later version.
X#
X#    This program is distributed in the hope that it will be useful,
X#    but WITHOUT ANY WARRANTY; without even the implied warranty of
X#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X#    GNU General Public License for more details.
X#
X#    You should have received a copy of the GNU General Public License
X#    along with this program; if not, write to the Free Software
X#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X#david@wubios.wustl.edu                 ^        Mr. David J. Camp
X#david%wubios@wugate.wustl.edu        < * >      +1 314 382 0584
X#...!uunet!wugate!wubios!david          v
X#                                            "Think about something else."
X#
Xset -v
Xdedigest > /tmp/di$$
Xelm -f /tmp/di$$ < /dev/tty
X/bin/rm /tmp/di$$
END_OF_FILE
if test 1154 -ne `wc -c <'elmdigest'`; then
    echo shar: \"'elmdigest'\" unpacked with wrong size!
fi
chmod +x 'elmdigest'
# end of 'elmdigest'
fi
if test -f 'dedigest' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'dedigest'\"
else
echo shar: Extracting \"'dedigest'\" \(1348 characters\)
sed "s/^X//" >'dedigest' <<'END_OF_FILE'
X#! /usr/bin/perl
X#    This is 'dedigest' a program to convert a digest to a folder.
X#    Copyright (C) 1990  David J. Camp
X#
X#    This program is free software; you can redistribute it and/or modify
X#    it under the terms of the GNU General Public License as published by
X#    the Free Software Foundation; either version 1, or (at your option)
X#    any later version.
X#
X#    This program is distributed in the hope that it will be useful,
X#    but WITHOUT ANY WARRANTY; without even the implied warranty of
X#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
X#    GNU General Public License for more details.
X#
X#    You should have received a copy of the GNU General Public License
X#    along with this program; if not, write to the Free Software
X#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X#
X#david@wubios.wustl.edu                 ^        Mr. David J. Camp
X#david%wubios@wugate.wustl.edu        < * >      +1 314 382 0584
X#...!uunet!wugate!wubios!david          v
X#                                            "Think about something else."
X#
Xwhile (<>)
X    {
X    if (substr ($_, 0, 3) eq "---")
X        {
X        print "From dummy Wed Feb  29 12:12:12 1990\n";
X        do
X            {
X            $_ = <>;
X            }
X            until (eof() || 0 != tr/\041-\177/\041-\177/);
X        }
X    print $_;
X    }
END_OF_FILE
if test 1348 -ne `wc -c <'dedigest'`; then
    echo shar: \"'dedigest'\" unpacked with wrong size!
fi
chmod +x 'dedigest'
# end of 'dedigest'
fi
echo shar: End of shell archive.
exit 0