π« 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)
For Product managers.
Engineering Prompt:
**Role:** Python GUI Developer (PyQt6 Specialist)
**Task:** Create "Batch QR Generator" Desktop App
**Objective:** A production tool to mass-generate branded QR codes from data files.
**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* QRCode: qrcode, Pillow, Pandas
* Packaging: PyInstaller
**Functional Requirements:**
1. **UI Layout (PyQt6):**
* **Data:** Excel File Selector + Dropdown to chose "Link Column".
* **Branding:** Logo Image picker (to embed in center).
* **Style:** Color Pickers for Foreground/Background. Size Slider (px).
* **Preview:** Real-time preview of a sample QR code.
2. **Core Logic:**
* Generate QR with `error_correction=H`.
* Calculate center position and paste logo with transparency handling.
* **Threading:** Process batch generation in background thread.
3. **Deliverables:**
* `main.py`: Complete source code.
* `requirements.txt`: Dependencies.
* **Build Instructions:**
* Windows: `pyinstaller --onefile --noconsole main.py`
* macOS: `pyinstaller --windowed --noconsole main.py`
π§ 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.