3 # $Id: genAllCommands.pl,v 1.1 2007/03/10 05:16:02 scott Exp $
5 # This script is used to generate HTML for the "allCommands.html" page.
6 # ./genAllCommands.pl cmds.txt
9 my $bHTML = 1; # change me to 0 to set ASCII output.
10 my @obsolete = ('ColorLimit', 'GlobalOpts', 'HilightColor', 'HilightColorset', 'IconFont', 'IconPath', 'PixmapPath', 'Recapture', 'RecaptureWindow', 'WindowShadeAnimate', 'WindowFont', 'WindowsDesk');
11 # @deprecated is not currently used.
12 my @deprecated = ('AddToDecor', 'ChangeDecor', 'DestroyDecor', 'UpdateDecor');
27 for (my $i = 0; $i <= $n; $i++)
29 my $rows = scalar(@
{$a[$i]});
30 $maxRows = $rows if ($rows > $maxRows);
31 printf("column $i has $rows items.\n");
37 printf("maxRows=$maxRows\n");
39 for (my $r = 0; $r < $maxRows; $r++)
41 printf("<tr>\n") if ($bHTML);
42 for (my $i = 0; $i <= $n; $i++)
44 my ($cmd, $prefix, $eek, $bObsolete) = ('n/a', '', '', 0);
45 if (defined $a[$i][$r])
48 my $l = substr($cmd, 0, 1);
49 $bObsolete = grep(/^$cmd$/, @obsolete);
50 my $c = ($bObsolete ?
"<font class=\"obsolete\">$cmd</font>" : $cmd);
51 $eek = "><a href=\"commands/$cmd.html\">$c</a";
52 if (!defined $letter{$l})
56 $prefix = " align=\"right\"><b>$l </b";
69 $cmd .= '*' if ($bObsolete);
70 printf("%-2s%-21s ", $prefix, $cmd);
74 printf("<td$prefix></td><td$eek></td>\n");
77 printf("\n") if (!$bHTML);
78 printf("</tr>\n") if ($bHTML);