#!/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'