Command line parameters |
The BarcodeReaderCLI command line parameters format is: {mode} {options} {@config} source ...
Where:
mode is an operation modes. Valid values are:
reader activates barcode reading mode. This is a default mode.
tbr-wizard activates TBR Wizard mode.
options
control the BarcodeReaderCLI session execution.
@config is a name of configuration file containing a list of option and source values
source
specifies location of image files to read barcodes from. It
can be an image file, a folder containing image files, or
an URL.
The source
parameter specifies the location of image files to read barcodes
from. At least one source is required. Multiple
sources can be specified.
The rules for source values are:
The value of source is an UTF-8 string, thus it can contain local language specific characters.
If the value contains spaces, it should be enclosed in double quotes ("")
The value can contain macro reference to be expanded at runtime
Most options are specified as -name=value, except that
Options with a value described as flag, are specified as -name
the -d option is specified
as -d="macro.name=macro.value"
If the value is described as a list, then zero or more valid values can be set. Multiple values should be separated by a comma (,). No spaces are allowed in the list.
The order of the options on the command line and in configuration files is important:
Reader options and source options that apply to a source should be specified before the source parameter. Thus different options can be applied to individual sources.
Output options that apply to an output should be specified before the -output option. Thus, different options can be applied to individual outputs.
All options (except -type) are assigned default values and do not have to be explicitly specified.
A new option value (except -output) replaces the previous value. An empty string value sets the option to its default value.
For options specifying file names (e.g. -output) and -output-text option.
If the value contains spaces, it should be enclosed in double quotes ("")
The value can contain macro reference to be expanded at runtime
Reader options configure the barcode reader parameters to be
applied to a source.
Name | Value description | Default | Valid values |
-type -t |
Required. List of barcode types | code39 code128 ucc128 pdf417 qr datamatrix drvlic |
code39 code128 codabar ucc128 code93 |
-tbr | List of TBR codes | 0 | Valid TBR codes for a given type are listed in TBR Wizard mode. |
-dir | List of barcode directions | all | all horz vert |
-max-bc -m |
Maximum number of barcodes to read on a page. 0 means read all barcodes. |
0 | 0 - 100 |
-timeout | Barcode reading timeout in seconds. 0 means no timeout. |
0 | |
-encoding | Encoding name to convert barcode data to UTF-8 text. |
This option control processing of multi-page file formats: PDF, TIFF, GIF
Name | Value description | Default | Valid values |
-pages | List of page selectors to limit reading to a set
of pages. |
all | all even odd first last NMB START-STOP maxbc:CNT |
Images from http://, htpps://, ftp:// sources are downloaded by the curl command-line application.
Linux version is installed with the BarcodeReaderCLI.
Windows version is available here and should be installed in the PATH.
The curl is invoked with the following default curl options: -s -S -D -m -o -L.
Additional options should be set as needed based on the system requirements.
BarcodeReaderCLI reports errors returned from the curl.
To resolve any problems invoke curl from the command line to identify required curl options.
Name | Value description | Default | Valid values |
-curl-timeout | Total timeout in seconds to download an image with curl. Value of 0.0 disables timeout. |
15.0 | Floating point number |
-curl-options | Additional curl options. The list of options should be enclosed in the double quotes (""). Use escape character before any double quotes in the list. |
List of options is documented here | |
-curl-no-redirect | Disable request redirect |
|
Name | Value description | Default | Valid values |
-sub -subfolders |
Include subfolders of source folder in processing |
true | true false |
-incl | List of file name masks to be included in processing | *.tif,*.tiff,*.jpg,*.jpeg,*.pdf,*.bmp,*.png | |
-excl | List of file name masks to be excluded from processing |
Name | Value description | Default | Valid values |
-output -o |
Path to the output file. Zero or more output files
can be specified. |
|
|
-format | Console output format, text value requires -output-text option to be specified. | json | xml json csv text |
-output-text | String with macro reference specify text output. To
defined text output in a file the string should be file://text-file-path, where
text-file-path is a template file path. |
||
-if-exists | Action to take if output file already exists: |
overwrite | overwrite append unique error |
-fields | Fields to output in XML-, JSON-, and CSV-formatted
output. Fields values are obtained through macro
expansion, except: drvlic outputs Driver License default fields. barcode outputs barcode (non-Driver License) default fields. |
For Driver License: last,first,middle,dob,eyes,hair,sex,height,weight, street,city,state,postal,id,issued,expires For other barcodes: text,data,length,type |
ind text data length type rectangle rotation corners
encoding tbr last first middle dob eyes hair sex height weight street city state postal id issued expires barcode drvlic |
Name | Value description |
-help -h |
Flag to output command-line help to console. No processing is done |
-silent -s |
Silent mode flag. Do not output BarcodeReaderCLI version and information |
-auth | Authorization code, provided by Inlite. |
-timeout | Execution timeout in seconds. Default value 0.0 disables timeout. Error is returned if total execution time exceeds timeout. |
-d | User specified command line macros.
|
A configuration file is a convenient way to define set of options
and/or sources shared by multiple systems or sessions.
For example
they can be used to:
Define macros specific to a system, such as location of source or output files.
Define reader options applied to sources specified on a command line.
Zero or more configuration files can be set on command line.
Multiple files are processed in the order of appearance.
The format rules for configuration files are:
-name sets command line flags
-name=value sets command line options with values
-d="macro.name=macro.value" specifies a command line macro
source
specifies the location of image files to read barcodes from.
It can be an image file, a folder containing image files or
URL. If value contains spaces, it should be enclosed in double
quotes ("")
# starts comment portion of a line. If # is a first character the whole line is treated as comment.
exit ends processing of configuration file. The rest of the file is ignored.
Configuration file should be in UTF-8 to accurately represent non-English characters.
Copyright © 2020 Inlite Research,
Inc. All rights reserved.
BarcodeReaderCLI 1.0-preview