Re: hypetombox

From: Peter C. McCluskey <pcm_at_rahul.net_at_hypermail-project.org>
Date: Mon, 13 Mar 2000 14:10:14 -0800 (PST)
Message-Id: <20000313221014.3D049AD_at_foxtrot.rahul.net>

 The sample files you sent me had some carriage returns which were confusing hypetombox. While I didn't get the same symptoms as you did, I'm moderately confident I've fixed the problems.
 I've also added a command line option to set the To: line to something other than "bogus".
 Here is a patch, or you can grab the latest copy from: http://www.rahul.net/pcm/hypetombox.pl

 require 5.000;

 use Getopt::Std;
-getopts('d:m:');
+getopts('d:m:n:');
 

 # This is a list of the fields in the comment header of each message.  

_at_@ -33,6 +33,8 @@
 

 _at_msgs = sort glob($fpat);  

+$to_address = $opt_n || 'bogus';
+
 # Open the output file for write.  

 $mbox_name = $opt_m || 'mbox';
_at_@ -73,7 +75,7 @@

         # same name.  

 	if($state eq 'HeaderComments'
-	   && ($line =~ /^<!-- (\w+)="(.+)" -->$/)) {
+	   && ($line =~ /^<!-- (\w+)="(.+)" -->(\s*)$/)) {
             $key = $1;
             $value = $2;
             $value =~ s/&amp;/&/g;

_at_@ -100,7 +102,7 @@
print MBOX "From $email $date\n"; print MBOX "Date: $sent\n"; print MBOX "Message-Id: <$id>\n"; - print MBOX "To: bogus\n"; + print MBOX "To: $to_address\n"; print MBOX "From: $email ($name)\n"; print MBOX "Subject: $subject\n"; if ($inreplyto) {

_at_@ -116,16 +118,16 @@
 

             # This is a body line.  

 jpl_at_vectorbd.com (Jim Lill) writes:

>On Mon, 6 Mar 2000, Peter C. McCluskey wrote:
>
>> 
>>  jpl_at_vectorbd.com (Jim Lill) writes:
>> >
>> >
>> >Hi..
>> >
>> >Is there a Y2K problem with that script or am I doing something wrong? I
>> >get BOGUS DATE stuff. I'm not a Perl guy!
>> 
>>  It is probably date formatting problem. It expects to find lines like
>> this in the html files:
>> 
>> <!-- received="Thu Oct 20 15:26:27 1995" -->
>> 
>> Can you look at the html source and send me a sample of the "received" lines
>> that you see?
>>  I will try to improve it sometime this week to look at other fields if it
>> can't parse the "received" line.

-- 
------------------------------------------------------------------------------
Peter McCluskey          | The US Idea Futures Exchange: speculate on
http://www.rahul.net/pcm | political,financial issues at http://www.usifex.com
Received on Tue 14 Mar 2000 12:21:15 AM GMT

This archive was generated by hypermail 2.2.0 : Thu 22 Feb 2007 07:33:52 PM GMT GMT