#! /usr/bin/perl # $Id:$ # ------------------------------------------------------------------------ # Convert list of HEP members from table to bulleted list for # browsers that can't handle tables properly. # # Author : G.J.Crone # # $Log:$ # # ------------------------------------------------------------------------ $input_file = $ARGV[0] ; if ($#ARGV eq 1) { $output_file = $ARGV[1] ; } # OK now try and open the input file. open (INPUT, $input_file) or die "Error opening $input_file" ; # Now try and work out the name of the output file if ("$output_file" eq "") { $OUTPUT = ">$input_file" ; if ($OUTPUT =~ m/.html$/) { $OUTPUT =~ s//.notable/ ; } else { $OUTPUT = "$OUTPUT.html" ; } } else { $OUTPUT = ">$output_file" ; } open (OUTPUT) or die "Error opening $OUTPUT" ; $in_table = 0 ; $cell = 0 ; while () { chomp ($_) ; if (m//^i ; } if (m^^^ig ; } if (($cell != 0) && (m^^i)) { $cell = 0 ; } s===i ; s===ig ; s===ig ; if ($in_table && m^\n)^$1\n
    ^i ; } until (!m=]*>=i) { if ($cell == 0) { s^^
  • ^i ; s^^^i ; } elsif ($cell == 2) { s=]*>==i ; s===i ; } else { s^^^i ; s^^^i ; } $cell++ ; } if (!m/^[ \t]*$/) { print OUTPUT "$_\n" ; } } close (INPUT); close (OUTPUT);