#!/usr/bin/env python3 """ Generate complete asset gallery HTML with all images """ import os from pathlib import Path from datetime import datetime def main(): assets_dir = Path("assets") # Find all images extensions = ['.png', '.jpg', '.jpeg', '.webp', '.gif'] all_images = [] for ext in extensions: all_images.extend(assets_dir.rglob(f"*{ext}")) all_images.extend(assets_dir.rglob(f"*{ext.upper()}")) # Remove duplicates and sort all_images = sorted(set(str(p) for p in all_images)) print(f"Found {len(all_images)} images") # Categorize images categories = {} def get_category(path): path_lower = path.lower() if 'phase_packs/0_demo' in path_lower: if 'crops' in path_lower: return '๐ฎ DEMO - Crops' elif 'tools' in path_lower: return '๐ฎ DEMO - Tools' elif 'animals' in path_lower: return '๐ฎ DEMO - Animals' return '๐ฎ DEMO - Other' elif 'phase_packs/1_faza_1' in path_lower: if 'crops' in path_lower: return '๐พ FAZA 1 - Crops' elif 'animals' in path_lower: return '๐พ FAZA 1 - Animals' elif 'tools' in path_lower: return '๐พ FAZA 1 - Tools' elif 'infrastructure' in path_lower: return '๐พ FAZA 1 - Infrastructure' return '๐พ FAZA 1 - Other' elif 'phase_packs/2_faza_2' in path_lower: if 'buildings' in path_lower: return '๐๏ธ FAZA 2 - Buildings' elif 'npcs' in path_lower: return '๐๏ธ FAZA 2 - NPCs' elif 'infrastructure' in path_lower: return '๐๏ธ FAZA 2 - Infrastructure' return '๐๏ธ FAZA 2 - Other' elif 'references/kai' in path_lower: return '๐ค References - Kai' elif 'references/ana' in path_lower: return '๐ค References - Ana' elif 'references/gronk' in path_lower: return '๐ค References - Gronk' elif 'references/susi' in path_lower: return '๐ค References - Susi' elif 'references/npcs' in path_lower: return '๐ฅ References - NPCs' elif 'references/creatures' in path_lower: return '๐ References - Creatures' elif 'references/buildings' in path_lower: return '๐ References - Buildings' elif 'references/trees' in path_lower: return '๐ณ References - Trees' elif 'references/ui' in path_lower: return '๐จ References - UI' elif 'references/' in path_lower: return '๐ธ References - Other' elif 'sprites' in path_lower: return '๐ผ๏ธ Sprites' elif 'crops' in path_lower: return '๐ฑ Crops' elif 'buildings' in path_lower: return '๐ Buildings' elif 'characters' in path_lower: return '๐ค Characters' elif 'grounds' in path_lower: return '๐ Ground Tiles' elif 'terrain' in path_lower: return 'โฐ๏ธ Terrain' elif 'ui' in path_lower: return '๐จ UI' elif 'vfx' in path_lower: return 'โจ VFX' elif 'props' in path_lower: return '๐ช Props' elif 'slike' in path_lower: return '๐ผ๏ธ Slike' return '๐ฆ Other' for img_path in all_images: cat = get_category(img_path) if cat not in categories: categories[cat] = [] categories[cat].append(img_path) # Generate HTML html = f'''