From: Fabian Keil Date: Thu, 8 Oct 2009 11:47:12 +0000 (+0000) Subject: Add a --help option. X-Git-Tag: v_3_0_15~23 X-Git-Url: http://www.privoxy.org/gitweb/?a=commitdiff_plain;h=978ae1b75bcb1d93c02fe81879e8a792c1ff2a51;p=privoxy.git Add a --help option. --- diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl index 5215267e..24039283 100755 --- a/tools/privoxy-log-parser.pl +++ b/tools/privoxy-log-parser.pl @@ -8,7 +8,7 @@ # # http://www.fabiankeil.de/sourcecode/privoxy-log-parser/ # -# $Id: privoxy-log-parser.pl,v 1.53 2009/10/08 11:45:56 fabiankeil Exp $ +# $Id: privoxy-log-parser.pl,v 1.54 2009/10/08 11:46:25 fabiankeil Exp $ # # TODO: # - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting @@ -2242,11 +2242,34 @@ sub get_cli_options () { 'show-ineffective-filters' => \$cli_options{'show-ineffective-filters'}, 'accept-unknown-messages' => \$cli_options{'accept-unknown-messages'}, 'statistics' => \$cli_options{'statistics'}, - 'version' => sub { VersionMessage && exit(0) } + 'version' => sub { VersionMessage && exit(0) }, + 'help' => \&help, ); } +sub help () { + our %cli_options; + + VersionMessage(); + + print << " EOF" + +Options and their default values if they have any: + [--accept-unknown-messages] + [--html-output] + [--no-embedded-css] + [--no-msecs] + [--no-syntax-highlighting] + [--show-ineffective-filters] + [--statistics] + [--title $cli_options{'title'}] + [--version] +see "perldoc $0" for more information + EOF + ; + exit(0); +} ################################################################################ # main