tags 602478 + patch
retitle 602478 ocrad: [PATCH] manual -- Unclear options -o and -x
thanks
2011-01-25 00:49 Jakub Wilk <[email protected]>:
> * Dmitry Katsubo <[email protected]>, 2011-01-12, 14:46:
>
>> I believe that "-o" and "-x" options should be a bit better
>> documented for help output. For me personally "OCR Result" is the
>> OCR'ed text. Perhaps the manual should explicitly say, that "OCR
>> Results" is something in OCRAD-specific format, specified in README.
>
> In ocrad 0.21 (which I accidentally uploaded to unstable rather than
> experimental...) this information moved from README to the info file.
> The manual page already redirects to the Texinfo manual for full
> documentation.
>
> Is that satisfactory for you? If it's not, could you please forward
> the bug upstream ([email protected] mailing list)? Thanks in advance.

0.17-4 reads:


        -o <file>
            place the output into <file>

        -x <file>
            export OCR Results File to <file>

0.21-1 reads:

       -o, --output=<file>
              place the output into <file>

       -x, --export=<file>
              export OCR Results File to <file>

If possible, please have it read:

       -o, --output=<file>
              save the extracted text from image to output into <file>

       -x, --export=<file>
              export results in orcad speficic format to <file>

I would also add contents of the README to the "DESCRIPTION" section of manual
page. Patch attached.

Jari

>From 03f0e5b528b5590f8421713e6a4a3eea96ab688b Mon Sep 17 00:00:00 2001
From: Jari Aalto <[email protected]>
Date: Tue, 25 Jan 2011 17:17:26 +0200
Subject: [PATCH] main.cc::show_help(): Improve description
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Jari Aalto <[email protected]>
---
 main.cc |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/main.cc b/main.cc
index be92725..91b5946 100644
--- a/main.cc
+++ b/main.cc
@@ -115,10 +115,23 @@ bool Input_control::parse_threshold( const char * const s ) throw()
   }
 
 
+#define DESCRIPTION "
+
 void show_help() throw()
   {
   std::printf( "%s - Optical Character Recognition program.\n", Program_name );
-  std::printf( "Reads pnm file(s), or standard input, and sends text to standard output.\n" );
+  std::printf( "\n\
+GNU Ocrad is an OCR (Optical Character Recognition) program based on a\n\
+feature extraction method. It reads images in pbm (bitmap), pgm\n\
+(greyscale) or ppm (color) formats and produces text in byte (8-bit) or\n\
+UTF-8 formats. The pbm, pgm and ppm formats are collectively known as\n\
+pnm. Reads pnm file(s), or standard input, and sends text to standard output.\n\
+\n\
+For better results the characters should be at least 20 pixels high.\n\
+Merged characters are always a problem. Try to avoid them.\n\
+Very bold or very light (broken) characters are also a problem.\n\
+Always see with your own eyes the pnm file before blaming ocrad for the\n\
+results.\n" );
   std::printf( "\nUsage: %s [options] [files]\n", invocation_name );
   std::printf( "\nOptions:\n" );
   std::printf( "  -h, --help               display this help and exit\n" );
@@ -130,14 +143,14 @@ void show_help() throw()
   std::printf( "  -F, --format=<fmt>       output format (byte, utf8)\n" );
   std::printf( "  -i, --invert             invert image levels (white on black)\n" );
   std::printf( "  -l, --layout             perform layout analysis\n" );
-  std::printf( "  -o, --output=<file>      place the output into <file>\n" );
+  std::printf( "  -o, --output=<file>      save the extracted text from image to output into <file>\n" );
   std::printf( "  -q, --quiet              suppress all messages\n" );
   std::printf( "  -s, --scale=[-]<n>       scale input image by [1/]<n>\n" );
   std::printf( "  -t, --transform=<name>   try `--transform=help' for a list of names\n" );
   std::printf( "  -T, --threshold=<n%%>     threshold for binarization (0-100%%)\n" );
   std::printf( "  -u, --cut=<l,t,w,h>      cut input image by given rectangle\n" );
   std::printf( "  -v, --verbose            be verbose\n" );
-  std::printf( "  -x, --export=<file>      export OCR Results File to <file>\n" );
+  std::printf( "  -x, --export=<file>      export result sin orcad speficic format to <file>\n" );
   if( verbosity > 0 )
     {
     std::printf( "  -1..6                    pnm output file type (debug)\n" );
-- 
1.7.2.3

Reply via email to