A command-line tool to generate QR codes from a CSV file in SVG, PDF, and PNG formats. Now includes animated QR codes in the terminal!
- ✅ Generate QR codes from a CSV file
- ✅ Supports SVG, PDF, and PNG formats
- ✅ Supports adding logo to QRCode (PNG Only)
- ✅ Custom QR size and margin
Ensure you have Python installed along with the required dependencies:
pip install qrcode[pil] pandas cairosvg pillow
python bulkqrgen.py [-i data.csv] [-o svg,pdf,png] [-size 500] [-m 20] [-logo logo.png] [-ani]
| Argument | Description | Default |
|---|---|---|
-i |
CSV file with QR data | data.csv |
-o |
Output formats: svg, pdf, png (comma-separated) |
svg,pdf,png |
-size |
QR code size in pixels | 500 |
-m |
Margin size around QR code | 20 |
-logo |
Path to logo file (optional) | None |
-ani |
Show 10x10 animated QR codes in terminal, cycling one at a time with a 0.3s delay | Off |
python bulkqrgen.py
python bulkqrgen.py -o pdf,png
python bulkqrgen.py -logo logo.png
python bulkqrgen.py -size 300 -m 10
python bulkqrgen.py -ani
When using the -ani flag, the script will display a 10x10 animated QR code in the terminal, cycling one at a time with a 0.3s delay. The animation disappears once the process completes.
At the end of the process, the script will display:
- ✅ Total time taken
- ✅ Average time per QR code
- The script reads each line of the CSV file and generates a QR code.
- It always generates SVG first, then converts to other formats if needed.
- If SVG is not chosen as an output format, it gets deleted after processing.
- The progress bar dynamically adjusts based on terminal width.
- If
-aniis used, a 10x10 animated QR code cycles in the terminal during processing. - After completion, it displays total time used and average time per QR code.