tags 602495 + patch thanks Here are patches to implement the ordering or options. the *.1 has been generated accordingly with help2man based on patched *cc.
Jari
>From 2a7d4dfe6b51535e695b9bc359a7fa7ab4b42383 Mon Sep 17 00:00:00 2001 From: Jari Aalto <[email protected]> Date: Fri, 5 Nov 2010 12:13:05 +0200 Subject: [PATCH] doc/ocrad.1: help2man update. List options -h, -V at end Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Signed-off-by: Jari Aalto <[email protected]> --- doc/ocrad.1 | 64 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 32 insertions(+), 32 deletions(-) diff --git a/doc/ocrad.1 b/doc/ocrad.1 index f77f984..7400b36 100644 --- a/doc/ocrad.1 +++ b/doc/ocrad.1 @@ -1,71 +1,71 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33. -.TH "OCRAD" "1" "June 2007" "Ocrad 0.17" "User Commands" -.SH "NAME" -Ocrad \- Optical Character Recognition Program -.SH "SYNOPSIS" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2. +.TH OCRAD "1" "November 2010" "Ocrad 0.17" "User Commands" +.SH NAME +Ocrad \- manual page for Ocrad 0.17 +.SH SYNOPSIS .B ocrad [\fIoptions\fR] [\fIfiles\fR] -.SH "DESCRIPTION" +.SH DESCRIPTION GNU Ocrad \- Optical Character Recognition program. Reads pnm file(s), or standard input, and sends text to standard output. -.SH "OPTIONS" -.TP -\fB\-h\fR, \fB\-\-help\fR -display this help and exit -.TP -\fB\-V\fR, \fB\-\-version\fR -output version information and exit -.TP +.SH OPTIONS +.TP \fB\-a\fR, \fB\-\-append\fR append text to output file -.TP +.TP \fB\-b\fR, \fB\-\-block=\fR<n> process only the specified text block -.TP +.TP \fB\-c\fR, \fB\-\-charset=\fR<name> try `\-\-charset=help' for a list of names -.TP +.TP \fB\-e\fR, \fB\-\-filter=\fR<name> try `\-\-filter=help' for a list of names -.TP +.TP \fB\-f\fR, \fB\-\-force\fR force overwrite of output file -.TP +.TP \fB\-F\fR, \fB\-\-format=\fR<fmt> output format (byte, utf8) -.TP +.TP \fB\-i\fR, \fB\-\-invert\fR invert image levels (white on black) -.TP +.TP \fB\-l\fR, \fB\-\-layout=\fR<n> layout analysis, 0=none, 1=column, 2=full -.TP +.TP \fB\-o\fR <file> place the output into <file> -.TP +.TP \fB\-p\fR, \fB\-\-crop=\fR<l,t,r,b> crop input image by given rectangle -.TP +.TP \fB\-s\fR, \fB\-\-scale\fR=\fI[\-]\fR<n> scale input image by [1/]<n> -.TP +.TP \fB\-t\fR, \fB\-\-transform=\fR<name> try `\-\-transform=help' for a list of names -.TP +.TP \fB\-T\fR, \fB\-\-threshold=\fR<n%> threshold for binarization (0\-100%) -.TP +.TP \fB\-v\fR, \fB\-\-verbose\fR be verbose -.TP +.TP \fB\-x\fR <file> export OCR Results File to <file> +.TP +\fB\-h\fR, \fB\-\-help\fR +display this help and exit +.TP +\fB\-V\fR, \fB\-\-version\fR +output version information and exit .SH "REPORTING BUGS" Report bugs to bug\[email protected] -.SH "COPYRIGHT" +.SH COPYRIGHT Copyright \(co 2007 Antonio Diaz Diaz. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> -.br +.br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" @@ -76,7 +76,7 @@ is maintained as a Texinfo manual. If the and .B Ocrad programs are properly installed at your site, the command -.IP +.IP .B info Ocrad -.PP +.PP should give you access to the complete manual. -- 1.7.2.3
>From f66477d0f9eeb747e6c024674a7fa0b63e1d13f2 Mon Sep 17 00:00:00 2001 From: Jari Aalto <[email protected]> Date: Fri, 5 Nov 2010 11:54:47 +0200 Subject: [PATCH] doc/ocrad.texinfo: Move --help and --version to the end like in other GNU programs Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Signed-off-by: Jari Aalto <[email protected]> --- doc/ocrad.texinfo | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-) diff --git a/doc/ocrad.texinfo b/doc/ocrad.texinfo index 0ae53f2..be333b6 100644 --- a/doc/ocrad.texinfo +++ b/doc/ocrad.texinfo @@ -104,16 +104,6 @@ ocrad [...@var{options}] [...@var{files}] Ocrad supports the following options: -...@table @samp -...@item --help -...@itemx -h -Print an informative help message describing the options and exit. -...@w{@samp{ocrad --verbose --help}} describes also hidden options. - -...@item --version -...@itemx -V -Print the version number of ocrad on the standard output and exit. - @item --append @itemx -a Append generated text to the output file instead of overwriting it. @@ -208,6 +198,15 @@ stdout, overriding text output except if output has been also redirected with the -o option. @end table +...@table @samp +...@item --help +...@itemx -h +Print an informative help message describing the options and exit. +...@w{@samp{ocrad --verbose --help}} describes also hidden options. + +...@item --version +...@itemx -V +Print the version number of ocrad on the standard output and exit. @node Image Format Conversion @chapter Image Format Conversion -- 1.7.2.3
>From eccba64462ca784b240c56377590f8f5352a80d0 Mon Sep 17 00:00:00 2001 From: Jari Aalto <[email protected]> Date: Fri, 5 Nov 2010 12:03:16 +0200 Subject: [PATCH] main.cc: (show_help): List options alphabetically and in GNU order Organization: Private Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit - List -h and -V at the end like in other GNU programs. - Display additional options during Ocrad::verbose in their alphabetical locations in the listing. Signed-off-by: Jari Aalto <[email protected]> --- main.cc | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/main.cc b/main.cc index e1d0f6b..0495285 100644 --- a/main.cc +++ b/main.cc @@ -118,11 +118,22 @@ void show_help() throw() std::printf( "Reads pnm file(s), or standard input, and sends text to standard output.\n" ); std::printf( "\nUsage: %s [options] [files]\n", invocation_name ); std::printf( "Options:\n" ); - std::printf( " -h, --help display this help and exit\n" ); - std::printf( " -V, --version output version information and exit\n" ); + + if( Ocrad::verbose ) + { + std::printf( " -1..6 pnm output file type (debug)\n" ); + } + std::printf( " -a, --append append text to output file\n" ); std::printf( " -b, --block=<n> process only the specified text block\n" ); std::printf( " -c, --charset=<name> try `--charset=help' for a list of names\n" ); + + if( Ocrad::verbose ) + { + std::printf( " -C, --copy 'copy' input to output (debug)\n" ); + std::printf( " -D, --debug=<level> (0-100) output intermediate data (debug)\n" ); + } + std::printf( " -e, --filter=<name> try `--filter=help' for a list of names\n" ); std::printf( " -f, --force force overwrite of output file\n" ); std::printf( " -F, --format=<fmt> output format (byte, utf8)\n" ); @@ -135,12 +146,9 @@ void show_help() throw() std::printf( " -T, --threshold=<n%%> threshold for binarization (0-100%%)\n" ); std::printf( " -v, --verbose be verbose\n" ); std::printf( " -x <file> export OCR Results File to <file>\n" ); - if( Ocrad::verbose ) - { - std::printf( " -1..6 pnm output file type (debug)\n" ); - std::printf( " -C, --copy 'copy' input to output (debug)\n" ); - std::printf( " -D, --debug=<level> (0-100) output intermediate data (debug)\n" ); - } + std::printf( " -h, --help display this help and exit\n" ); + std::printf( " -V, --version output version information and exit\n" ); + std::printf( "\nReport bugs to [email protected]\n" ); } -- 1.7.2.3

