|
| 1 | +# UAE Commemorative Coin Project - QR Code System |
| 2 | + |
| 3 | +This directory contains the QR code generation system for the UAE Commemorative Coin Project. The system generates QR codes that link to emirate-specific pages, cultural content, project documentation, and downloadable assets. |
| 4 | + |
| 5 | +## π― Purpose |
| 6 | + |
| 7 | +Generate QR codes for embedding in: |
| 8 | +- Formal documents |
| 9 | +- Project web pages |
| 10 | +- Commemorative coins (physical or digital) |
| 11 | +- Marketing materials |
| 12 | +- Documentation |
| 13 | + |
| 14 | +## π± QR Code Destinations |
| 15 | + |
| 16 | +### Live at Minting |
| 17 | +1. **Emirate 1 (Abu Dhabi)** - `https://u.ae/abudhabi` |
| 18 | +2. **Emirate 2 (Dubai)** - `https://u.ae/dubai` |
| 19 | +3. **Falcon Eye (Culture)** - `https://u.ae/culture` |
| 20 | + |
| 21 | +### Project Resources |
| 22 | +4. **Project Web Page** - GitHub repository |
| 23 | +5. **Documentation** - Technical documentation |
| 24 | +6. **Downloadable 3D Model** - Release assets |
| 25 | + |
| 26 | +## π Quick Start |
| 27 | + |
| 28 | +### Prerequisites |
| 29 | + |
| 30 | +```bash |
| 31 | +# Install required dependencies |
| 32 | +pip install qrcode[pil] pillow>=10.3.0 |
| 33 | +``` |
| 34 | + |
| 35 | +### Generate QR Codes |
| 36 | + |
| 37 | +```bash |
| 38 | +# Navigate to the project directory |
| 39 | +cd uae_coin_project |
| 40 | + |
| 41 | +# Run the QR code generator |
| 42 | +python generate_qr_codes.py |
| 43 | +``` |
| 44 | + |
| 45 | +### Output |
| 46 | + |
| 47 | +The script generates: |
| 48 | +- **PNG files** - High-quality raster images for documents and print |
| 49 | +- **SVG files** - Vector images for web and scalable applications |
| 50 | +- **Summary report** - Markdown documentation with previews |
| 51 | + |
| 52 | +Files are saved to: |
| 53 | +``` |
| 54 | +uae_coin_project/ |
| 55 | +βββ qr_codes/ |
| 56 | +β βββ emirate1_abudhabi_qr.png |
| 57 | +β βββ emirate1_abudhabi_qr.svg |
| 58 | +β βββ emirate2_dubai_qr.png |
| 59 | +β βββ emirate2_dubai_qr.svg |
| 60 | +β βββ falcon_eye_culture_qr.png |
| 61 | +β βββ falcon_eye_culture_qr.svg |
| 62 | +β βββ project_webpage_qr.png |
| 63 | +β βββ project_webpage_qr.svg |
| 64 | +β βββ documentation_qr.png |
| 65 | +β βββ documentation_qr.svg |
| 66 | +β βββ downloadable_3d_model_qr.png |
| 67 | +β βββ downloadable_3d_model_qr.svg |
| 68 | +βββ docs/ |
| 69 | + βββ QR_CODES_SUMMARY.md |
| 70 | +``` |
| 71 | + |
| 72 | +## π Documentation |
| 73 | + |
| 74 | +- **[QR Codes Summary](docs/QR_CODES_SUMMARY.md)** - Overview of all generated QR codes with previews |
| 75 | +- **[Update Instructions](docs/UPDATE_QR_DESTINATIONS.md)** - Guide for updating QR code destinations |
| 76 | + |
| 77 | +## π§ Customization |
| 78 | + |
| 79 | +### Updating URLs |
| 80 | + |
| 81 | +Edit `generate_qr_codes.py` and modify the `QR_DESTINATIONS` dictionary: |
| 82 | + |
| 83 | +```python |
| 84 | +QR_DESTINATIONS = { |
| 85 | + 'emirate1_abudhabi': { |
| 86 | + 'url': 'https://u.ae/abudhabi', # Change this URL |
| 87 | + 'description': 'Emirate 1 (Abu Dhabi) - Live at minting', |
| 88 | + 'filename': 'emirate1_abudhabi_qr' |
| 89 | + }, |
| 90 | + # ... more entries |
| 91 | +} |
| 92 | +``` |
| 93 | + |
| 94 | +Then regenerate: |
| 95 | +```bash |
| 96 | +python generate_qr_codes.py |
| 97 | +``` |
| 98 | + |
| 99 | +### Adjusting QR Code Appearance |
| 100 | + |
| 101 | +Modify parameters in the generator methods: |
| 102 | + |
| 103 | +```python |
| 104 | +# For PNG |
| 105 | +generator.generate_qr_png(url, filename, box_size=10, border=4) |
| 106 | + |
| 107 | +# For SVG |
| 108 | +generator.generate_qr_svg(url, filename, box_size='10mm', border=4) |
| 109 | +``` |
| 110 | + |
| 111 | +## π‘ Usage Examples |
| 112 | + |
| 113 | +### Embedding in HTML |
| 114 | + |
| 115 | +```html |
| 116 | +<!-- Using PNG --> |
| 117 | +<img src="qr_codes/emirate1_abudhabi_qr.png" alt="Abu Dhabi QR Code" width="200"> |
| 118 | + |
| 119 | +<!-- Using SVG (recommended for web) --> |
| 120 | +<img src="qr_codes/emirate1_abudhabi_qr.svg" alt="Abu Dhabi QR Code" width="200"> |
| 121 | +``` |
| 122 | + |
| 123 | +### Embedding in Markdown |
| 124 | + |
| 125 | +```markdown |
| 126 | + |
| 127 | +``` |
| 128 | + |
| 129 | +### Embedding in LaTeX/PDF Documents |
| 130 | + |
| 131 | +```latex |
| 132 | +\includegraphics[width=3cm]{qr_codes/emirate1_abudhabi_qr.png} |
| 133 | +``` |
| 134 | + |
| 135 | +### Using in Python |
| 136 | + |
| 137 | +```python |
| 138 | +from generate_qr_codes import UAECoinQRGenerator |
| 139 | + |
| 140 | +# Create generator |
| 141 | +generator = UAECoinQRGenerator(output_dir='my_qr_codes') |
| 142 | + |
| 143 | +# Generate a single QR code |
| 144 | +generator.generate_qr_png('https://example.com', 'my_qr_code') |
| 145 | + |
| 146 | +# Generate all QR codes |
| 147 | +results = generator.generate_all_qr_codes() |
| 148 | +``` |
| 149 | + |
| 150 | +## β
Best Practices |
| 151 | + |
| 152 | +### For Print Materials |
| 153 | +- Use PNG format at 300+ DPI |
| 154 | +- Ensure minimum size of 2cm x 2cm for reliable scanning |
| 155 | +- Test print quality before mass production |
| 156 | +- Maintain white border (quiet zone) of at least 4 modules |
| 157 | + |
| 158 | +### For Digital Display |
| 159 | +- Use SVG format for scalability |
| 160 | +- Ensure responsive design on mobile devices |
| 161 | +- Test on multiple screen sizes |
| 162 | +- Provide fallback link text below QR code |
| 163 | + |
| 164 | +### For Physical Coins |
| 165 | +- Consider surface finish and scanning conditions |
| 166 | +- Test under various lighting conditions |
| 167 | +- Use high error correction (already enabled) |
| 168 | +- Position QR code on flat surface area |
| 169 | + |
| 170 | +## π Security Considerations |
| 171 | + |
| 172 | +- All URLs use HTTPS for secure connections |
| 173 | +- High error correction (30%) enables scanning even with minor damage |
| 174 | +- URLs are publicly accessible (no authentication required) |
| 175 | +- No personal or sensitive information encoded in QR codes |
| 176 | + |
| 177 | +## π§ͺ Testing |
| 178 | + |
| 179 | +Validate QR code generation: |
| 180 | + |
| 181 | +```bash |
| 182 | +# Run the generator and verify output |
| 183 | +python generate_qr_codes.py |
| 184 | + |
| 185 | +# Check that all files were created |
| 186 | +ls -la qr_codes/ |
| 187 | + |
| 188 | +# Verify the summary report was generated |
| 189 | +cat docs/QR_CODES_SUMMARY.md |
| 190 | +``` |
| 191 | + |
| 192 | +Test QR codes: |
| 193 | +1. Scan each QR code with multiple smartphones |
| 194 | +2. Test on both iOS and Android devices |
| 195 | +3. Verify destination URLs load correctly |
| 196 | +4. Check mobile responsiveness of destination pages |
| 197 | + |
| 198 | +## π Technical Specifications |
| 199 | + |
| 200 | +- **Error Correction**: Level H (High) - 30% recovery |
| 201 | +- **QR Code Version**: Auto-adjusted based on data length |
| 202 | +- **Box Size**: 10px (PNG) / 10mm (SVG) |
| 203 | +- **Border**: 4 modules (standard quiet zone) |
| 204 | +- **Color Scheme**: Black on white for maximum contrast |
| 205 | +- **Image Formats**: PNG (raster) and SVG (vector) |
| 206 | + |
| 207 | +## π Post-Deployment Updates |
| 208 | + |
| 209 | +After QR codes are deployed (printed/embedded): |
| 210 | + |
| 211 | +1. **URL Redirects**: Use redirects to change destinations without regenerating QR codes |
| 212 | +2. **Content Updates**: Update content at destination URLs |
| 213 | +3. **Analytics**: Monitor QR code scans using URL tracking |
| 214 | + |
| 215 | +See [UPDATE_QR_DESTINATIONS.md](docs/UPDATE_QR_DESTINATIONS.md) for detailed instructions. |
| 216 | + |
| 217 | +## π License |
| 218 | + |
| 219 | +This QR code generation system is part of the Activbot project. |
| 220 | +See the main [LICENSE](../LICENSE) file for details. |
| 221 | + |
| 222 | +## π€ Contributing |
| 223 | + |
| 224 | +To add new QR codes or improve the system: |
| 225 | + |
| 226 | +1. Edit `generate_qr_codes.py` |
| 227 | +2. Add new entries to `QR_DESTINATIONS` |
| 228 | +3. Regenerate QR codes |
| 229 | +4. Update documentation |
| 230 | +5. Submit a pull request |
| 231 | + |
| 232 | +## π Support |
| 233 | + |
| 234 | +For issues or questions: |
| 235 | +- GitHub Issues: https://github.com/ELMOURABEA/Activbot/issues |
| 236 | +- Documentation: See main README.md |
| 237 | + |
| 238 | +--- |
| 239 | + |
| 240 | +**Generated by Activbot QR Code System** π¦πͺ |
0 commit comments