π« The Pain Point
You need 1,000 QR stickers for your product inventory. Each QR leads to myshop.com/product/{id}. Generating them one by one online is slow.
π Agentic Solution
A Batch QR Generator that reads your product list and outputs branded QR images.
Key Features:
- Logo Embed: Put your brand logo in the center.
- High Resolution: 1000x1000px suitable for printing.
- Batch Mode: Generate from Excel data.
βοΈ Phase 1: Commander (Quick Fix)
For a quick batch.
Prompt:
βI have an Excel
products.xlsxwith columns βProduct_IDβ and βURLβ. Write a Python script using qrcode and Pillow to:
- Generate: QR code for each URL.
- Logo: Embed βlogo.pngβ in the center (optional).
- Size: 500x500 pixels.
- Error Correction: High (to survive logo obstruction).
- Output: Save as
qr_codes/{Product_ID}.png.Print progress.β
Result: Branded QR codes for all products.
ποΈ Phase 2: Architect (Permanent Tool)
Engineering Prompt:
**Role:** Python Tool Developer
**Task:** Create a "Batch QR Code Generator".
**Requirements:**
1. **GUI:**
* Select Excel data source.
* Column dropdowns for Content and Filename.
* Logo file picker (optional).
* Size slider.
* Color pickers (foreground/background).
* Progress bar.
2. **Logic:**
* Use qrcode with error_correction=H.
* Paste logo at center.
* Handle large batches efficiently.
3. **Deliverables:**
* `qr_gen.py`
* `run.bat`, `run.sh`
* `requirements.txt`
π§ Prompt Decoding
- Error Correction H: High level allows 30% of QR to be covered (by logo) and still be scannable.
π οΈ Instructions
- Install:
pip install qrcode pillow pandas - Copy Prompt β Run.