"Jeff Breidenbach" writes:

> Thanks, Lars. I don't see the script - could you please resend?

Hm.  Looks like the attachment was stripped?

Here it is again:

#!/usr/bin/perl

$url = $ARGV[0];
$compressed = $ARGV[1];

unlink "/tmp/piper-complete.txt";

if ($compressed) {
    $suffix = "txt.gz";
} else {
    $suffix = "txt";
}

system("wget", "--no-check-certificate", "-O", "/tmp/piper", $url);

open(PIPER, "/tmp/piper") || die;

while (<PIPER>) {
    $files[$i++] = $1 if /"(.*.$suffix)"/;
}

close PIPER;

for (; $i >= 0; $i--) {
    print($files[$i], "\n");
    system("wget", "--no-check-certificate", "-O", "/tmp/piper.$suffix", $url . 
$files[$i]);
    if ($compressed) {
        system("zcat /tmp/piper.txt.gz | /gmane/fix-piper >> 
/tmp/piper-complete.txt");
    } else {
        system("/gmane/fix-piper < /tmp/piper.txt >> /tmp/piper-complete.txt");
    }
}

and

fix-piper is the following:

#!/usr/bin/perl

while (<STDIN>) {
    s/^(From:? .*) (at|en) /\1\@/;
    s/^Date: ([A-Z][a-z][a-z]) +([A-Z][a-z][a-z]) +([0-9]+) +([0-9:]+) 
+([0-9]+)/Date: \1, \3 \2 \5 \4 +0000/; 
    print;
}


-- 
(domestic pets only, the antidote for overdose, milk.)
  [EMAIL PROTECTED] * Lars Magne Ingebrigtsen

_______________________________________________
Discussion list for The Mail Archive
Gossip@jab.org
http://jab.org/cgi-bin/mailman/listinfo/gossip

Reply via email to