From: guckes@inf.fu-berlin.de (Sven Guckes) Subject: umich.convert.pl Date: Mon, 10 Jul 1995 15:53:03 +0200 (MET DST) #!/usr/local/bin/perl # version 950530 # feedback wanted! Send your comments to guckes@inf.fu-berlin.de # # Purpose: Converts the "archive upload info" about the UMICH Macintosh # archive into a "digest". It thus can be read by several other programs # which can sort each item an present them in a list for easy reading. # Examples for such programs: # ELM - a mail user agent for UNIX # read with "elm -f umich.toselect" # NN - a newsreader # read with "nn umich.toselect" # Mail2000 - a mail digest reader for the Macintosh # Drop "umich.toselect" onto Mail2000. # # Usage: # 1) Save this to "umich.pl". # 2) Make it executable: "chmod 755 umich.pl" # 3) Run it: "./umich.pl umich.uploads > umich.toselect". # Assuming that the new upload mail is in "umich.uploads". # 4) Chop all lines until first description entry. # 5) Delete trailing spaces from lines. # 6) Chop signature. # # If you know how steps 4-6 can be done with PERL then let me know! # # === # while(<>) { print($_), next unless m,^/,; chop; s,^/mac/,,; $nextline = <>; $nextline =~ m,^\s*(\d+)\s+(\d+)/(\d+)/(\d+)\s+(.*)$,; $date = sprintf("%02d%02d%02d", $4, $3, $2); print <From questions@mac.archive.umich.edu Fri Apr 21 00:00:00 1995 Subject: $_ From: UMICH X-Date: $date X-Size: $1 X-Convert: $5 HEADER }