#!/usr/bin/perl -w # # db_to_html_table # Copyright (C) 2002 by John Heidemann # $Id: db_to_html_table,v 1.5 2005/03/14 02:58:40 johnh Exp $ # # This program is distributed under terms of the GNU general # public license, version 2. See the file COPYING # in $dblibdir for details. # sub usage { print <getopt) { $ch = $dbopts->opt; if ($ch eq 'd') { $debug++; } elsif ($ch eq 'g') { $grouping = $dbopts->optarg; } else { &usage; }; }; #&usage if ($#ARGV < 0); my($new_fs_code) = @ARGV; &readprocess_header; @f = (); # suppress warning my($group_n) = 0; print "\n"; print ""; foreach (@colnames) { print " "; }; print "\n"; my($color1, $color2) = ("#f0f0f0", "#d0d0d0"); while () { &delayed_pass_comments && next; &split_cols; my($color) = ""; if (defined($grouping)) { if ($group_n++ >= $grouping) { ($color1, $color2) = ($color2, $color1); $group_n = 1; }; $color = "bgcolor=\"$color1\""; }; print ""; foreach (@f) { $_ = dblib_text2html($_); print " "; }; print "\n"; }; print "
$_
$_
\n"; # print "# | $prog ", join(" ", @orig_argv), "\n"; exit 0; # warning suppression @colnames = ();