This script acts a middleware between the 2D scanner and the Partsbox web app. It reads the barcode from the scanner via a serial port, replaces non-printable ASCII characters as needed, and send the final barcode string as a keyboard input to be picked up by Partsbox.
python -m venv env
source env/bin/activate
pip install -r requirements.txtIf on linux you'll need to install the following packages:
apt install python3-tkTo connect a scanner connected to /dev/ttyACM0 at 115200 baud:
python partsbox_barcode.py /dev/ttyACM0 115200