Handprint command summary¶
Command-line options¶
The following table summarizes all the command line options available. (Note: on Windows computers, /
must be used as the prefix character instead of the -
dash character):
Short |
Long form |
Meaning |
Default |
|
---|---|---|---|---|
|
|
Add credentials for service A and exit |
||
|
|
Write outputs to files named B-n |
Use base names of image files |
⚑ |
|
|
Don’t color-code info messages |
Color-code terminal output |
|
|
|
Compare to ground truth; see |
||
|
|
Display annotation types D |
Display text annotations |
★ |
|
|
Produce extended results |
Produce only summary image |
|
|
|
Read file names or URLs from file F |
Use args on the command line |
|
|
|
Don’t create summary image |
Create an N×N grid image |
|
|
|
Display help, then exit |
||
|
|
Reuse prior JSON results if found |
Ignore any existing results |
|
|
|
Display known services and exit |
||
|
|
Move each text annotation by x,y |
|
|
|
|
Use confidence score threshold N |
|
|
|
|
Write all outputs to directory O |
Write to images’ directories |
|
|
|
Don’t write messages while working |
Be chatty while working |
|
|
|
Use looser criteria for |
||
|
|
Use recognition service S; see |
Use all services |
|
|
|
Use T number of threads |
Use (#cores)/2 threads |
|
|
|
Write program version info and exit |
||
|
|
Use color X for text annotations |
Red |
|
|
|
Use font size Z for text annotations |
Use font size 12 |
|
|
|
Write detailed execution info to OUT |
Normal mode |
⬥ |
⚑ If URLs are given, then the outputs will be written by default to names of the form document-n
, where n is an integer. Examples: document-1.jpg
, document-1.handprint-google.txt
, etc. This is because images located in network content management systems may not have any clear names in their URLs.
★ The possible values of D are: text
, bb
, bb-word
, bb-line
, bb-para
. Multiple values must be separated with commas. The value bb
is a shorthand for bb-word,bb-line,bb-para
. The default is text
.
⬥ To write to the console, use the character -
as the value of OUT; otherwise, OUT must be the name of a file where the output should be written.
Return values¶
This program exits with a return code of 0 if no problems are encountered. It returns a nonzero value otherwise. The following table lists the possible return values:
Code |
Meaning |
---|---|
0 |
success – program completed normally |
1 |
the user interrupted the program’s execution |
2 |
encountered a bad or missing value for an option |
3 |
no network detected – cannot proceed |
4 |
file error – encountered a problem with a file |
5 |
server error – encountered a problem with a server |
6 |
an exception or fatal error occurred |
Additional notes¶
The debug logging functionality is implemented using Sidetrack and all calls to the debug code are conditionalized on the Python symbol __debug__
. It is carefully written so that you can cause the calls to be optimized out completely if your run Python with optimization turned on (e.g., using the -O
command-line option).