from pathlib import Path import base64 import subprocess root = Path(__file__).parent for theme in ('light', 'dark'): source = root / f'inventory-source-{theme}.png' crop = root / f'source-crop-{theme}.png' subprocess.run(['magick', str(source), '-crop', '850x360+74+178', '+repage', str(crop)], check=True) encoded = base64.b64encode(crop.read_bytes()).decode('ascii') dark = theme == 'dark' bg = '#0b0a08' if dark else '#f7f4ee' ink = '#f8f5f0' if dark else '#1c1a17' muted = '#cbbfae' if dark else '#60594f' accent = '#e6a36f' if dark else '#a45529' panel = '#181511' if dark else '#fffdf9' border = '#4b4035' if dark else '#d8d0c5' badge_ink = '#17120d' if dark else '#fffaf5' svg = f''' gitdex / SOURCE FILTER / 01 A WORKING VIEW Choose a source. See the inventory change when one configured source comes into focus. Actual frontend pixels. Fictional API replies. SYNTHETIC FIXTURE 02 / FICTIONAL-LAB SELECTED Two fictional repository rows. Source dropdown and table are from the real UI. NO GITHUB SYNC ยท NO REAL TOKEN ''' target = root / f'poster-study-{theme}.svg' target.write_text(svg) subprocess.run(['rsvg-convert', '-w', '1600', '-h', '900', '-o', str(root / f'poster-study-{theme}.png'), str(target)], check=True) subprocess.run(['magick', str(root / f'poster-study-{theme}.png'), '-resize', '384x216!', str(root / f'poster-thumb-{theme}.png')], check=True)