A small utility that reads QR code images referenced in a CSV file (generated by BT QR Code Export) and appends the decoded URLs back into the CSV.
- Node.js (v14 or later)
npm installnode decode-qr.js "<csvPath>" "<optionalBaseFolder>"| Argument | Required | Description |
|---|---|---|
csvPath |
Yes | Path to the CSV file generated by BT QR Code Export. |
baseFolder |
No | Root folder where the QR code images are stored. Defaults to the directory containing the CSV file. |
node decode-qr.js "C:\Temp\BT QR Code Export\QR Code Export.csv"- Reads the input CSV file, stripping any BOM (Byte Order Mark) that may be present in files exported from Excel or Windows tools.
- Expects a
QRCodeImgFilecolumn containing relative paths to QR code images. - Decodes each QR code image and extracts the embedded URL.
- Writes a new CSV file (with
- Updatedappended to the original filename) that includes aQRCodeLinkcolumn with the decoded URLs.
- csv-parser — CSV reading
- csv-writer — CSV writing
- jimp — Image processing
- jsqr — QR code decoding
- strip-bom-stream — BOM removal from input streams