Barcode Reader CLI
Macros
macros are defined as name value pairs, where a value replaces the name during the barcodereadercli session this process is called macro expansion macros are used specify names of input and output file/folder names select data presented in the output macro format and expansion rules in most cases, a macro is referenced by its name enclosed in curly brackets {macro name} {macro name} macro names are case insensitive general macro references format is {namespace macro name?/format} {namespace macro name?/format} where namespace namespace optional namespace to distinguish macros with the same name defined in multiple categories macro name macro name the required name of a macro ? ? optional mark to expand undefined macro to an empty string without this mark, an undefined macro causes a runtime error |format |format optional macro expansion control available formats #xn #xn duplicate macro value n times #n #n expands to the name of the macro #v #v expands to the value of the macro examples {tab|#x3} {tab|#x3} expands to 3 tab characters {dob?|#n is #v} {dob?|#n is #v} expands to a string dob is dob is user date of birth , if the current barcode contains driver's license data; otherwise, it expands to an empty string {path temp}{path sep}myoutput xml {path temp}{path sep}myoutput xml expands to a myoutput xml myoutput xml file path located in a temporary folder, e g /tmp/myoutput xml {bc page} {bc page} expands to the page number in a file, where a barcode is located macro categories session macros the session macros remain constant in the course of the barcodereadercli session the namespace for these macros is prg prg name value description path tmp path tmp system temporary folder path (without terminating path separator} path sep path sep path separator character \ on windows, / on linux host host host computer name app filename app filename barcodereadercli file name app version app version barcodereadercli version start date start date session start date format yyyy mm dd start time start time session start time format hh\ mm\ ss nl nl new line character cr cr carriage return character eol eol carriage return + new line characters tab tab tab character bom bom utf 8 byte order mark (bom) environment variables selected environmental variables are converted to a macro the namespace for these macros is env env user macros the user macros are defined using d=" d=" macro name=macro value" option on a command line or in the configuration file the namespace for these macros is user user the value of user macros referenced in filename options can reference other user macros (recursive expansion ) source macros the source macros are associated with the currently processed source the namespace for these macros is source source name value description path path source path specified on a command line type type source type file , folder , url files files number of files found in the source bc count bc count total number of found barcodes file macros the file macros are associated with the currently processed image file the namespace for these macros is file file name value description path path image file path filename filename filename section of path basename basename filename without extension ext ext the extension portion of the filename folder folder path to a folder containing the image file pages pages number of pages in a file format format image file format size size size of image file bc count bc count total number of found barcodes page macros the page macros are associated with the currently processed image page the namespace for these macros is page page name value description page page page number (1 based) bpp bpp bits per pixel width width page width in pixels height height page height in pixels hdpi hdpi horizontal dpi vdpi vdpi vertical dpi compr compr page compression path path path to the image file containing this page bc count bc count total number of found barcodes barcode macros the barcode macros are associated with the currently processed barcode the namespace for these macros is bc bc name value description ind ind barcode index on a page text text barcode text value as utf 8 string data data barcode value as a byte array encoded as base 64 string length length barcode value length type type barcode type rotation rotation barcode rotation encoding encoding the encoding used to convert barcode data to utf 8 text tbr tbr tbr code used to read this barcode (not present if code was not set) path path image file path abspath abspath image file absolute path page page page number (1 based) mod mod barcode module size in pixels skew skew barcode skew rectangle left rectangle left the left coordinate of the encompassing rectangle rectangle top rectangle top the top coordinate of the encompassing rectangle rectangle right rectangle right the right coordinate of the encompassing rectangle rectangle bottom rectangle bottom the bottom coordinate of the encompassing rectangle corners tl x corners tl x x coordinate of the top left corner corners tl y corners tl y y coordinate of the top left corner corners tr x corners tr x x coordinate of the top right corner corners tr y corners tr y y coordinate of the top right corner corners bl x corners bl x x coordinate of the bottom left corner corners bl y corners bl y y coordinate of the bottom left corner corners br x corners br x x coordinate of the bottom right corner corners br y corners br y y coordinate of the bottom right corner driver's license macros the driver's license macros are associated with the currently processed barcode; it contains driver's license or id card data the namespace for these macros is dl dl name value description last last cardholder family name first first cardholder first name middle middle cardholder middle name dob dob cardholder's date of birth eyes eyes cardholder eyes color hair hair cardholder hair color sex sex cardholder sex height height cardholder height in ft and inch weight weight cardholder weight in pounds street street cardholder street address city city cardholder city state state cardholder state or province postal postal cardholder zip or postal code id id card id number issued issued card issue date expires expires card expiration date