#!/usr/bin/env python3 """Build self-contained Monster High picker v2: static grid (works without JS) + inline progressive-enhancement JS (favorites, lightbox, copy list).""" import os, sys SHOOT = "/Volumes/Sam Storage/YellowMellow/2026/Monster High Theme (10:01:2026)" PREV = os.path.join(SHOOT, "ClientPicker", "Previews") # 1400px originals (lightbox) THUMB = os.path.join(SHOOT, "ClientPicker", "Thumbs") # 500px web thumbs OUT = os.path.join(SHOOT, "Monster High - Photo Picker.html") def ids(): for d in (PREV, THUMB): try: fs = sorted(f for f in os.listdir(d) if f.endswith(".jpg") and not f.startswith("._")) if fs: return [f[:-4] for f in fs] except FileNotFoundError: pass sys.exit("no previews found") IDS = ids() print(f"building with {len(IDS)} photos") cells = [] for pid in IDS: cells.append( f'
' f'' f'{pid}' f'
{pid}
' f'
' ) html = """ Monster High Theme — Photo Picks
Static preview — the buttons above need JavaScript. To pick photos, simply tell Sam the numbers of the ones you like.

Monster High Theme

Tap a photo to view it larger. Tap the circle to mark favorites.
0 favorites
__CELLS__
""" html = html.replace("__CELLS__", "\n".join(cells)) with open(OUT, "w") as f: f.write(html) print("WROTE", OUT, len(html), "bytes")