# HG changeset patch # User ondovb # Date 1316811975 14400 # Node ID a5814dd5a11a1fb1cc459ee8cb1f0534a9f5dff3 Uploaded diff -r 000000000000 -r a5814dd5a11a tabular2HTML.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tabular2HTML.pl Fri Sep 23 17:06:15 2011 -0400 @@ -0,0 +1,69 @@ + +use strict; + +my ($table, $input, $output, @spans) = @ARGV; + +# positions that should have dark right borders +# +my %dark; + +foreach my $span ( @spans ) +{ + if ( $span > 1 ) + { + # only initialize if there are any spans more than 1 + + pop @spans; + my $i; + + foreach my $span ( @spans ) + { + $i += $span; + $dark{$i - 1} = 1; + } + + last; + } +} + +open TABLE, ">>$table" or die $!; +open INPUT, "<$input" or die $!; + +my $parity; + +while ( my $line = ) +{ + chomp $line; + + my @vals = split /\t/, $line; + + $parity = ( $parity eq 'odd' ? 'even' : 'odd' ); + + print TABLE "