Mercurial
view mrjunejune/generate-icons.sh @ 215:c3df85159b31
removed a python library that isn't used for much.
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Sat, 28 Feb 2026 20:34:18 -0800 |
| parents | 3b47e82ac57e |
| children |
line wrap: on
line source
#!/bin/bash # Generate PWA icons from SVG # Requires ImageMagick: apt-get install imagemagick cd "$(dirname "$0")/src/public" if ! command -v convert &> /dev/null; then echo "❌ ImageMagick not found. Please install it:" echo " Ubuntu/Debian: sudo apt-get install imagemagick" echo " macOS: brew install imagemagick" echo "" echo "Or use an online tool: https://realfavicongenerator.net/" exit 1 fi echo "🎨 Generating PWA icons from epi_all_colors.svg..." # 192x192 icon echo " → Creating icon-192.png..." convert epi_all_colors.svg -resize 192x192 -background none icon-192.png # 512x512 icon echo " → Creating icon-512.png..." convert epi_all_colors.svg -resize 512x512 -background none icon-512.png # Maskable icon (512x512 with safe zone - 80% of size) echo " → Creating icon-maskable-512.png..." convert epi_all_colors.svg -resize 409x409 -background none -gravity center -extent 512x512 icon-maskable-512.png echo "" echo "✅ Icons generated successfully!" echo "" echo "Generated files:" echo " - icon-192.png" echo " - icon-512.png" echo " - icon-maskable-512.png" echo "" echo "Next steps:" echo " 1. Verify icons look good: ls -lh src/public/icon-*.png" echo " 2. Test PWA: Open site in Chrome → DevTools → Application → Manifest" echo " 3. Run Lighthouse audit to check PWA score"