#!/opt/exptools/perl/bin/perl # may be get from line too, in case stacie wants to use it #use HTML::Parse; #use HTML::FormatText; sub fill { local ($key,$val)=@_; #$val=HTML::FormatText->new->format(parse_html($val)); $val=~s/\ \;//g; $val=~s/\;/SEMICOLON/g; $res{$key}=$val; } $start0=0;$start1=0;$start2=0; $nline=0; while (){ $nline++; chop (); if (/^\<\/HEAD\>/){ $start0=1;$start1=0;$start2=0; } if (/^HTTP\/1\.1 200 OK$/){ $start0=0;$start1=0;$start2=0; @keys=sort keys %res; if ($#keys >= 0){ print "$nline\;"; print $#keys; foreach $key (@keys){ print "\;$key=$res{$key}"; } print "\n"; } undef %res; } if ($start0==1 && /^Bug (\d+)$/){ $start0=0;$start1=1;$start2=0; &fill ("Bug", $1); } if ($start1==1 && /\QWho<\/th>What<\/th>Old value<\/th>New value<\/th>When<\/th>\E/){ $start0=0;$start1=0;$start2=1; $changes=-1; } if ($start2==1){ if (/\<\/table\>/) { $start2=0;} else{ if (/\/) { $changes ++; $variable=-1;} if (/\(.*)\<\/td\>$/) { $variable++; &fill ("$changes:$variable", $1); } } } }