Paul, 5 November 2026: channels become Use Orbit's channels or Create your own, then a scan showing what goes where (your own channel marked); Drift's scan gives the library's size and a time estimate; motion notes for Ollie rolling in and blinking, Drift bobbing and blinking, and the cast drifting right through the cosmos at the end; a Choose your look step with six themes (Orbit Night, Daybreak, Nebula, Retro Tube, Deep Sea, High Contrast). For approval only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
226 lines
15 KiB
Python
226 lines
15 KiB
Python
#!/usr/bin/env python3
|
||
"""First launch for a new user, design proposal (Paul, 5 November 2026): welcome with Ollie, choose your media server, sign in,
|
||
Drift reads the library, pick your channels, who watches (the Grown-ups PIN and a Kids profile), all set. The starry style and
|
||
drawing come from the profiles design (build-profiles.py) and the cast's model sheet. A design for approval only."""
|
||
import ast
|
||
from pathlib import Path
|
||
HERE = Path(__file__).resolve().parent
|
||
PROFILES = HERE.parent / 'profiles' / 'build-profiles.py'
|
||
# Take build-profiles.py's set-up and drawing, without its screens.
|
||
tree = ast.parse(PROFILES.read_text())
|
||
keep = []
|
||
for n in tree.body:
|
||
if isinstance(n, ast.Expr) and isinstance(n.value, ast.Call) and getattr(n.value.func, 'id', '') != 'exec': continue
|
||
if isinstance(n, (ast.Import, ast.ImportFrom, ast.FunctionDef, ast.Expr)) or (isinstance(n, ast.Assign) and not any(isinstance(t, ast.Name) and t.id in ('cards', 'kinds', 'kids', 'rows', 'rail', 'overlay', 'x0') for t in n.targets)):
|
||
keep.append(n)
|
||
if isinstance(n, ast.Assign) and any(isinstance(t, ast.Name) and t.id == 'GROWNUP' for t in n.targets): break
|
||
g = {'__file__': str(PROFILES)}
|
||
exec(compile(ast.Module(keep, []), str(PROFILES), 'exec'), g)
|
||
globals().update({k: v for k, v in g.items() if k not in ('HERE', '__file__')})
|
||
import builtins
|
||
def save(name):
|
||
g['im'].resize((W, H), Image.LANCZOS).save(HERE / name); print(name)
|
||
def D(): return g['d']
|
||
GREEN = (110, 220, 170)
|
||
|
||
THEMES = [
|
||
# name, line, background, panel, accent, text, muted, stars
|
||
('Orbit Night', 'The original: deep navy and gold', (7, 22, 50), (18, 53, 107), (255, 222, 89), (255, 255, 255), (183, 203, 232), (60, 80, 120)),
|
||
('Daybreak', 'Light and airy, for bright rooms', (232, 241, 251), (255, 255, 255), (30, 102, 208), (14, 30, 60), (90, 110, 140), (190, 210, 235)),
|
||
('Nebula', 'Purples and pinks of deep space', (23, 11, 46), (58, 29, 107), (255, 122, 198), (255, 255, 255), (200, 180, 230), (90, 60, 140)),
|
||
('Retro Tube', 'Warm 80s telly, with scanlines', (26, 18, 11), (59, 42, 26), (255, 179, 71), (255, 236, 210), (210, 180, 140), (90, 70, 50)),
|
||
('Deep Sea', 'Calm teal and aqua', (4, 33, 43), (11, 74, 92), (110, 240, 216), (240, 255, 252), (160, 210, 210), (40, 90, 100)),
|
||
('High Contrast', 'Black, white and yellow: easiest to read', (0, 0, 0), (26, 26, 26), (255, 255, 0), (255, 255, 255), (220, 220, 220), (60, 60, 60)),
|
||
]
|
||
|
||
def steps(at):
|
||
"""Dots along the top: where you are in setting up."""
|
||
names = ['Welcome', 'Server', 'Sign in', 'Channels', 'Look', 'Who watches', 'All set']
|
||
x = 960 - (len(names) - 1) * 100
|
||
for i, n in enumerate(names):
|
||
cx = x + i * 200
|
||
col = YELLOW if i == at else (GREEN if i < at else (60, 80, 120))
|
||
circ((cx, 60), 9 if i == at else 7, col)
|
||
if i < len(names) - 1: D().line((S(cx + 16), S(60), S(cx + 184), S(60)), fill=(GREEN if i < at else (40, 60, 100)), width=SW(3))
|
||
text((cx, 80), n, reg(22), WHITE if i == at else MUTED, 'ma')
|
||
|
||
def button(x, y, w, label, focus=True):
|
||
box(x, y, w, 70, fill=YELLOW if focus else PANEL, r=10)
|
||
text((x + w / 2, y + 16), label, semi(32), NAVY if focus else WHITE, 'ma')
|
||
|
||
PINK = (255, 122, 198)
|
||
def motion(x, y, w, h, lines):
|
||
"""A note on how it moves: dashed pink, never part of the screen itself."""
|
||
for k in range(0, int(w), 24): D().line((S(x + k), S(y), S(x + min(k + 12, w)), S(y)), fill=PINK, width=SW(3)); D().line((S(x + k), S(y + h), S(x + min(k + 12, w)), S(y + h)), fill=PINK, width=SW(3))
|
||
for k in range(0, int(h), 24): D().line((S(x), S(y + k), S(x), S(y + min(k + 12, h))), fill=PINK, width=SW(3)); D().line((S(x + w), S(y + k), S(x + w), S(y + min(k + 12, h))), fill=PINK, width=SW(3))
|
||
text((x + 18, y + 12), 'MOTION', semi(22), PINK)
|
||
for i, l in enumerate(lines): text((x + 18, y + 44 + i * 32), l, reg(24), (255, 200, 230))
|
||
|
||
def mini_home(x, y, w, h, t, focus=False):
|
||
"""A small Home screen in theme [t], for choosing a look."""
|
||
name, line, bg, panel, accent, ink, muted, star = t
|
||
box(x, y, w, h, fill=bg, r=14, outline=YELLOW if focus else (60, 80, 120), width=5 if focus else 2)
|
||
rnd = __import__('random').Random(hash(name) % 1000)
|
||
for _ in range(40): circ((x + 10 + rnd.random() * (w - 20), y + 10 + rnd.random() * (h - 20)), 1.2, star)
|
||
if name == 'Retro Tube':
|
||
for k in range(int(h / 6)): D().line((S(x + 4), S(y + 4 + k * 6), S(x + w - 4), S(y + 4 + k * 6)), fill=(36, 26, 16), width=SW(1))
|
||
text((x + 18, y + 14), 'ORBIT', semi(18), ink)
|
||
for k, n in enumerate(('Home', "What's On", 'Guide', 'Catch Up')): text((x + w * .32 + k * w * .16, y + 16), n, reg(14), ink if k == 0 else muted)
|
||
text((x + w / 2, y + h * .22), 'What would you like to watch?', semi(18), ink, 'ma')
|
||
for k in range(5):
|
||
by = y + h * .32 + k * h * .12
|
||
box(x + w * .22, by, w * .56, h * .1, fill=accent if k == 0 else panel, r=5)
|
||
text((x + w * .26, by + h * .015), ('All channels', 'Entertainment', 'Movies', 'Comedy', 'Kids')[k], semi(14), bg if k == 0 else ink)
|
||
|
||
# 1. Welcome.
|
||
screen(); steps(0)
|
||
avatar('ollie', (960, 380), 150)
|
||
text((960, 580), 'Welcome to Orbit', anton(80), WHITE, 'ma')
|
||
text((960, 690), 'Proper TV channels, made from your own films and series.', reg(36), MUTED, 'ma')
|
||
text((960, 740), "It takes about five minutes. I'm Ollie, and I'll show you round.", reg(32), MUTED, 'ma')
|
||
button(810, 840, 300, "Let's go")
|
||
motion(1260, 250, 560, 200, ['Ollie rolls in from the left, ring tilting,', 'settles with a little bounce, then blinks', 'every few seconds. Still with Reduce motion.'])
|
||
keys([('OK', 'Start')])
|
||
save('first-run-1-welcome.png')
|
||
|
||
# 2. Choose your server.
|
||
screen(); steps(1)
|
||
text((960, 170), 'Where are your films and series?', anton(60), WHITE, 'ma')
|
||
text((960, 260), 'Choose the media server they live on. Orbit only reads it, and never changes or copies anything.', reg(30), MUTED, 'ma')
|
||
servers = [('Emby', 'Sign in with your Emby account', (82, 181, 75)), ('Plex', 'Link with a code at plex.tv/link', (229, 160, 13)),
|
||
('Jellyfin', 'Sign in with your Jellyfin account', (170, 92, 195)), ('Silo', 'Sign in with your Silo account', (69, 184, 245))]
|
||
for i, (name, how, col) in enumerate(servers):
|
||
x = 150 + i * 420; y = 360
|
||
focus = i == 0
|
||
box(x, y, 380, 400, fill=NAVY if focus else PANEL, r=16, outline=YELLOW if focus else None, width=4)
|
||
# A plain server mark in its colour: our own drawing, not the product's logo.
|
||
for k in range(3): box(x + 130, y + 60 + k * 44, 120, 34, fill=col, r=8)
|
||
for k in range(3): circ((x + 230, y + 77 + k * 44), 6, NAVY)
|
||
text((x + 190, y + 230), name, anton(50), WHITE, 'ma')
|
||
text((x + 190, y + 310), how, reg(24), MUTED, 'ma')
|
||
text((960, 820), "Not sure? It's whichever app you watch your own films on. You can add another later in Settings.", reg(28), MUTED, 'ma')
|
||
keys([('◄►', 'Choose'), ('OK', 'Select'), ('Back', 'Welcome')])
|
||
save('first-run-2-server.png')
|
||
|
||
# 3. Sign in, then Drift scans the library, with how long it'll take.
|
||
screen(); steps(2)
|
||
text((480, 170), 'Sign in to Emby', anton(56), WHITE, 'ma')
|
||
for i, (label, value, focus) in enumerate((('Server address', 'https://media.example.home', False), ('Username', 'paul', False), ('Password', '••••••••••', False))):
|
||
y = 270 + i * 130
|
||
text((180, y), label, semi(28), MUTED)
|
||
box(180, y + 40, 600, 70, fill=PANEL, r=10)
|
||
text((206, y + 56), value, reg(32), WHITE)
|
||
box(180, 690, 600, 70, fill=GREEN, r=10); text((480, 706), 'Signed in', semi(32), NAVY, 'ma')
|
||
box(940, 170, 880, 760, fill=DEEP, r=18)
|
||
drift((1380, 310), 100, (53, 214, 242))
|
||
text((1380, 440), "Drift's scanning your library", semi(40), WHITE, 'ma')
|
||
text((1380, 495), 'About 15,600 titles: roughly 4 minutes left', reg(30), YELLOW, 'ma')
|
||
libs = [('Films', '12,480', 1.0, 'Done'), ('TV programmes', '3,102 series', .62, 'Scanning: Doctor Who'), ('Kids', '418', 0, 'Next'), ('Music videos', '—', 0, 'Skipped: not for channels')]
|
||
for i, (lib, size, done, state) in enumerate(libs):
|
||
y = 560 + i * 82
|
||
text((1010, y), lib, semi(28), WHITE); text((1010, y + 36), state, reg(22), MUTED)
|
||
box(1330, y + 12, 300, 16, fill=(30, 50, 90), r=8)
|
||
if done: box(1330, y + 12, 300 * done, 16, fill=GREEN, r=8)
|
||
text((1780, y + 2), size, reg(26), MUTED, 'ra')
|
||
motion(180, 800, 700, 170, ['Drift bobs gently and blinks; its puffs breathe', 'while it works. The estimate counts down,', 'the bars fill. Still with Reduce motion.'])
|
||
keys([('OK', 'Carry on in the background')])
|
||
save('first-run-3-scan.png')
|
||
|
||
# 4a. Channels: ours, or your own.
|
||
screen(); steps(3)
|
||
text((960, 150), 'Your channels', anton(60), WHITE, 'ma')
|
||
text((960, 240), 'Start with Orbit\'s ready-made channels, make your own, or both.', reg(30), MUTED, 'ma')
|
||
box(180, 320, 760, 520, fill=NAVY, r=18, outline=YELLOW, width=4)
|
||
for k, (lg, dx, dy) in enumerate((('orbit_one_epg', 0, 0), ('paradox_epg', 1, 0), ('orbit_terra_epg', 0, 1), ('toonz_epg', 1, 1), ('orbit_action_epg', 0, 2), ('orbit_gold_epg', 1, 2))):
|
||
box(240 + dx * 330, 360 + dy * 90, 300, 74, fill=PANEL, r=10); logo(RES / f'{lg}.webp', 262 + dx * 330, 372 + dy * 90, 170)
|
||
text((560, 650), "Use Orbit's channels", anton(46), WHITE, 'ma')
|
||
text((560, 720), '30 channels ready to go, each matched to your', reg(26), MUTED, 'ma'); text((560, 754), 'library: sitcoms, sci-fi, nature, films, kids and more.', reg(26), MUTED, 'ma')
|
||
text((560, 798), 'Recommended', semi(24), YELLOW, 'ma')
|
||
box(980, 320, 760, 520, fill=PANEL, r=18)
|
||
for k in range(3):
|
||
box(1100, 370 + k * 80, 520, 60, fill=(30, 50, 90), r=10)
|
||
text((1130, 384), "Dad's Saturday Mornings", semi(28), WHITE); text((1130, 464), 'Choose genres, series and films', reg(26), MUTED); text((1130, 544), 'Name it, pick a number and a time', reg(26), MUTED)
|
||
d0 = D(); d0.line((S(1360), S(330 + 330), S(1360), S(330 + 330)), fill=WHITE)
|
||
text((1360, 650), 'Create your own', anton(46), WHITE, 'ma')
|
||
text((1360, 720), 'Make a channel from scratch: Orbit finds what', reg(26), MUTED, 'ma'); text((1360, 754), 'fits and builds its schedule for you.', reg(26), MUTED, 'ma')
|
||
keys([('◄►', 'Choose'), ('OK', 'Select'), ('Back', 'Sign in')])
|
||
save('first-run-4a-channels.png')
|
||
|
||
# 4b. The scan: what goes where.
|
||
screen(); steps(3)
|
||
text((960, 140), "Here's where everything goes", anton(56), WHITE, 'ma')
|
||
text((960, 225), 'Drift matched your library to your channels. Untick any you don\'t want; your own channel is marked.', reg(28), MUTED, 'ma')
|
||
rows = [('orbit_one_epg', 'Orbit 1', 'Friends, Frasier, The Simpsons and 181 more', 184, True, False), ('paradox_epg', 'Paradox', 'The X-Files, Doctor Who, Buffy and 93 more', 96, True, False),
|
||
('orbit_terra_epg', 'Terra', 'Planet Earth, Blue Planet and 39 more', 41, True, False), (None, "Dad's Saturday Mornings", 'Thundercats, He-Man, Transformers and 22 more', 25, True, True),
|
||
('orbit_action_epg', 'Orbit Action', 'Die Hard, Heat, Speed and 309 more', 312, True, False), ('orbit_tots_epg', 'Orbit Tots', 'Bluey, Hey Duggee and 21 more', 23, True, False),
|
||
('orbit_ring_x_epg', 'Ring X', 'Only 18 wrestling titles: a short loop', 18, False, False)]
|
||
for i, (lg, name, examples, count, on, own) in enumerate(rows):
|
||
y = 290 + i * 88; focus = i == 3
|
||
box(160, y, 1600, 76, fill=NAVY if focus else PANEL, r=12, outline=YELLOW if focus else None)
|
||
if lg: logo(RES / f'{lg}.webp', 182, y + 14, 150)
|
||
else: box(182, y + 14, 150, 48, fill=(255, 122, 198), r=8); text((257, y + 22), 'YOUR OWN', semi(20), NAVY, 'ma')
|
||
text((360, y + 10), name, semi(28), WHITE); text((360, y + 42), examples, reg(22), MUTED)
|
||
box(1200, y + 30, 320 * min(1, count / 320), 16, fill=GREEN if on else (60, 80, 120), r=8)
|
||
text((1590, y + 20), f'{count}', semi(28), WHITE, 'ra')
|
||
box(1650, y + 18, 46, 40, fill=GREEN if on else (40, 60, 100), r=8)
|
||
if on: D().line([(S(1661), S(y + 38)), (S(1671), S(y + 49)), (S(1687), S(y + 27))], fill=NAVY, width=SW(6))
|
||
text((960, 920), '1,204 titles have no channel yet. Orbit will suggest homes for them in the Director\'s Chair.', reg(26), MUTED, 'ma')
|
||
keys([('▲▼', 'Move'), ('OK', 'Tick'), ('►', 'See what\'s in it'), ('Back', 'Channels')])
|
||
save('first-run-4b-scan-results.png')
|
||
|
||
# 5. Choose your look.
|
||
screen(); steps(4)
|
||
text((960, 140), 'Choose your look', anton(60), WHITE, 'ma')
|
||
text((960, 225), 'Change it any time in Settings › Watching. The cast stay the same in every look.', reg(28), MUTED, 'ma')
|
||
for i, t in enumerate(THEMES):
|
||
x = 140 + (i % 3) * 560; y = 290 + (i // 3) * 360
|
||
mini_home(x, y, 520, 270, t, focus=i == 2)
|
||
text((x, y + 284), t[0], semi(28), YELLOW if i == 2 else WHITE); text((x + 520, y + 290), t[1], reg(20), MUTED, 'ra')
|
||
keys([('◄►▲▼', 'Choose'), ('OK', 'Use this look'), ('Back', 'Channels')])
|
||
save('first-run-5-look.png')
|
||
|
||
# 6. Who watches?
|
||
screen(); steps(5)
|
||
text((960, 150), 'Who watches?', anton(60), WHITE, 'ma')
|
||
text((960, 240), 'Set a PIN for Grown-ups, and add a Kids profile if there are little ones about.', reg(30), MUTED, 'ma')
|
||
box(300, 320, 600, 480, fill=PANEL, r=18)
|
||
avatar(GROWNUP, (600, 440), 90)
|
||
text((600, 550), 'Grown-ups', semi(40), WHITE, 'ma')
|
||
text((600, 605), 'Everything, including After Dark', reg(26), MUTED, 'ma')
|
||
for k in range(4): box(470 + k * 70, 660, 54, 66, fill=YELLOW if k == 0 else (30, 50, 90), r=8)
|
||
text((497, 670), '4', semi(40), NAVY, 'ma')
|
||
box(1020, 320, 600, 480, fill=NAVY, r=18, outline=YELLOW, width=4)
|
||
avatar('ollie', (1320, 440), 90)
|
||
text((1320, 550), 'Kids', semi(40), WHITE, 'ma')
|
||
text((1320, 605), 'Tots, cartoons and the Arcade', reg(26), MUTED, 'ma')
|
||
box(1170, 660, 300, 66, fill=GREEN, r=10); text((1320, 672), 'Add Kids', semi(32), NAVY, 'ma')
|
||
text((960, 850), 'You can skip this: Orbit then opens straight to everything, with no PIN.', reg(26), MUTED, 'ma')
|
||
keys([('◄►', 'Choose'), ('OK', 'Select'), ('Back', 'Look')])
|
||
save('first-run-6-who-watches.png')
|
||
|
||
# 7. All set: the cast drifting right through the cosmos.
|
||
screen(); steps(6)
|
||
for k in range(26):
|
||
y = 160 + (k * 37) % 520; x = 120 + (k * 211) % 1700
|
||
D().line((S(x), S(y), S(x + 60 + (k % 4) * 30), S(y)), fill=(70, 95, 140), width=SW(2))
|
||
mascot((960, 420), 120)
|
||
blaze((640, 470), 70, (255, 138, 61)); zip_((780, 330), 60, (255, 79, 163)); drift((1140, 330), 64, (53, 214, 242)); luna((1290, 470), 66, (167, 123, 255))
|
||
bumble((1150, 600), 54, None)
|
||
text((960, 740), "You're on air", anton(80), WHITE, 'ma')
|
||
text((960, 850), '9 channels are planning their first week. The Drive-In opens on Friday.', reg(32), MUTED, 'ma')
|
||
button(780, 920, 360, 'Start watching')
|
||
motion(1290, 170, 560, 200, ['The cast float gently to the right while', 'stars stream past to the left: a journey', 'through the cosmos. Still with Reduce motion.'])
|
||
keys([('OK', 'Start watching')], y=1020)
|
||
save('first-run-7-all-set.png')
|
||
|
||
# The looks, larger, for choosing between them.
|
||
screen()
|
||
text((80, 60), 'ORBIT LOOKS', anton(56), YELLOW)
|
||
text((80, 140), 'Six themes to choose from in onboarding and Settings. Colours change; the cast, logos and layout stay the same.', reg(28), MUTED)
|
||
for i, t in enumerate(THEMES):
|
||
x = 80 + (i % 3) * 600; y = 210 + (i // 3) * 420
|
||
mini_home(x, y, 560, 320, t)
|
||
text((x, y + 334), t[0], semi(30), WHITE); text((x, y + 372), t[1], reg(22), MUTED)
|
||
for k, c in enumerate(t[2:6]): circ((x + 400 + k * 38, y + 352), 14, c)
|
||
save('themes.png')
|