#!/usr/bin/perl # use strict; unless (-d $ENV{'LJHOME'}) { die "\$LJHOME not set.\n"; } require "$ENV{'LJHOME'}/doc/raw/build/docbooklib.pl"; require "$ENV{'LJHOME'}/cgi-bin/console.pl"; my $ret; $ret .= "Administrative Console Commands\n"; foreach my $cmdname (sort keys %LJ::Con::cmd) { my $cmd = $LJ::Con::cmd{$cmdname}; next if ($cmd->{'hidden'}); $ret .= "\n"; $ret .= " $cmdname\n"; my $des = $cmd->{'des'}; cleanse(\$des); $ret .= " \n$des\n"; if ($cmd->{'args'}) { $ret .= " \n Arguments:\n"; my @args = @{$cmd->{'args'}}; while (my ($argname, $argdes) = splice(@args, 0, 2)) { $ret .= " "; $ret .= "$argname\n"; cleanse(\$argdes); $ret .= " $argdes\n"; $ret .= " \n"; } $ret .= " \n"; } $ret .= " \n"; $ret .= "\n"; } $ret .= "\n"; print $ret;