as released as part of build91
[pspp] / results2html
index c682b5e514cf9755c60c36eb2155d0b9aed5ce98..9c73d12e31ef3d380297c551c4da14b48129958a 100755 (executable)
@@ -56,7 +56,7 @@ while (<LOG>) {
     if (my ($title) = /^## (.*) ##$/) {
        $log_class = "step";
        if (my ($name, $product) = $title =~ /^Saving(?:\s+([^:]*):)?\s+(.*)$/) {
-           my $href = "$product/index.html";
+           my $href = "$product/summary.html";
            $href = $product if ! -e $href;
 
            my (%p);
@@ -88,9 +88,12 @@ while (<LOG>) {
            push (@steps, \%s);
        }
     } else {
-       if (my ($diagnostic) = /(error|warning):/i) {
+       my $diagnostic;
+       $diagnostic = "error" if /error:/i || /FAILED/;
+       $diagnostic = "warning" if /warning:/i;
+       if ($diagnostic) {
            my (%d);
-           $d{DIAGNOSTIC} = lc ($diagnostic);
+           $d{DIAGNOSTIC} = $diagnostic;
            $d{MESSAGE} = $_;
            $d{LN} = $ln;
 
@@ -120,8 +123,6 @@ while (<LOG>) {
                }
            }
            push (@{$steps[$#steps]{CHILDREN}}, \%d);
-
-           $log_class = "$diagnostic";
        }
     }
     printf LOG_HTML "<a name=\"%d\"><tt>%4d</tt></a>  ", $ln, $ln;
@@ -132,7 +133,7 @@ while (<LOG>) {
     }
 }
 
-open (INDEX, '>','index.html');
+open (INDEX, '>','summary.html');
 
 print INDEX <<EOF;
 <html>