From f326a81ff5716cde37a4cdcffd18c75e9de97fe4 Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Tue, 23 Oct 2001 11:20:45 +0000 Subject: [PATCH] remember Peter's tool --- 00DEV/status2html | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 00DEV/status2html diff --git a/00DEV/status2html b/00DEV/status2html new file mode 100755 index 0000000000..0d36d119fa --- /dev/null +++ b/00DEV/status2html @@ -0,0 +1,44 @@ +#!/usr/bin/perl +# +# Convert the Status text file to HTML +# +# Usage: status2html.pl < 00STATUS > 00STATUS.html +# +my $bgcolor = "ffffff"; + +print ("\n"); +LOOP:while(<>) { +@array = ($text0, $text1, $text2, $text3, $text4) = /^(\w+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+/; + + + $array[0] =~ s|^\s+(.*?)|{$array[0]=$1}|es; # Remove whitespaces at the beginning + next LOOP if $array[0] eq ""; + next LOOP if $array[0] =~ /^=/; + $array[0] =~ s|(.*?)\s+$|{$array[0]=$1}|es; # Remove whitespaces at the end + + + printf ("\n", $bgcolor); + + +foreach (@array) { + print (""); +} + + +if ($bgcolor eq "f0f0f0") { $bgcolor = "ffffff"; } +else { $bgcolor = "f0f0f0"; } + +} + +print ("
"); + ($dummy, $_) = ($_ =~ /^(\w+):(\S+)/) if ($_ =~ /^(\w+):(\S+)/); # Remove 1th part to ":" + + if ($_ eq "no") { + print (""); + } elsif ($_ eq "yes") { + print (""); + } + print ("$_"); + print ("
\n"); + +