Python CLI
The Python CLI is the tested reference implementation. It is useful for batch checks, CI, and debugging outside Excel.
Install it from the repository root:
python3 -m pip install -e .
Then run:
python3 -m datamatrix2codes data/codes.csv output.csv
Input can be:
- one raw scanner string per row;
- a CSV with a
CODEcolumn; - a CSV with another column selected by
--column.
Example:
python3 -m datamatrix2codes scans.csv parsed.csv --column RawCode
Output columns:
CODE,PC,SN,LOTE,CAD,STATUS,CONFIDENCE,HAS_GS,EXPLAIN
Run tests from the repository root:
python3 -m unittest discover -s tests -v