Files
OrbitTv/design/next/preamble.py
T
pauljdandClaude Opus 5.5 a7d135ec30 Character Shorts and Living Continuity proposal, The Chase storyboard, channel decisions, next designs
Documentation and prototype only, as Paul asked: character bible, five gag storyboards,
channel idents, placement and safety rules, engine assessment and a phased rollout. The
roadmap records the channel decisions from the Nostalgia TV comparison.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-06 11:20:01 +00:00

32 lines
2.2 KiB
Python

#!/usr/bin/env python3
"""(preamble from build-multiroom.py) Orbit Multiroom, design proposal (Paul, 6 November 2026): bring Orbit to another room. Stage 1, Transfer my Orbit: a new box
joins an existing one on the home network, the existing TV confirms, chosen settings come across, the room is named. Shared
schedules are a clear choice. The Emby password never travels. Uses the first-run design's drawing. For approval only."""
import ast
from pathlib import Path
HERE = Path(__file__).resolve().parent
SRC = Path(__file__).resolve().parent.parent / 'first-run' / 'build-first-run.py'
tree = ast.parse(SRC.read_text())
# The first-run script's set-up and helpers, without its screens.
keep = []
for n in tree.body:
if isinstance(n, ast.Expr) and isinstance(n.value, ast.Constant): continue
if isinstance(n, (ast.Import, ast.ImportFrom, ast.FunctionDef)) or (isinstance(n, ast.Assign) and any(isinstance(t, ast.Name) and t.id in ('HERE', 'PROFILES', 'tree', 'keep', 'g', 'GREEN', 'THEMES', 'PINK') for t in n.targets)) or isinstance(n, ast.For) or (isinstance(n, ast.Expr) and getattr(getattr(n.value, 'func', None), 'id', '') in ('exec',)) or (isinstance(n, ast.Expr) and isinstance(n.value, ast.Call) and getattr(getattr(n.value, 'func', None), 'attr', '') == 'update'):
keep.append(n)
if isinstance(n, ast.FunctionDef) and n.name == 'mini_home': break
ns = {'__file__': str(SRC)}
exec(compile(ast.Module(keep, []), str(SRC), 'exec'), ns)
globals().update({k: v for k, v in ns.items() if k not in ('HERE', '__file__', 'save')})
OUT = Path(__file__).resolve().parent
def save(name): ns['g']['im'].resize((W, H), Image.LANCZOS).save(OUT / name); print(name)
def D(): return ns['g']['d']
def tv(x, y, w, h, label, sub, focus=False):
box(x, y, w, h, fill=NAVY if focus else PANEL, r=16, outline=YELLOW if focus else None, width=4)
box(x + w / 2 - 90, y + 40, 180, 110, fill=(10, 30, 66), r=8); box(x + w / 2 - 20, y + 152, 40, 14, fill=(60, 80, 120), r=3)
text((x + w / 2, y + 180), label, semi(36), WHITE, 'ma'); text((x + w / 2, y + 230), sub, reg(24), MUTED, 'ma')
def head(title, line):
text((960, 120), title, anton(58), WHITE, 'ma'); text((960, 205), line, reg(28), MUTED, 'ma')