Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 1841cb88e384d138b364ad8568cdfb5102d28612
parent f8a76b901d1dd94b789a4d3f8752669b04383690
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu, 29 Oct 2026 00:11:33 -0400

umtool: the status ledger a card as tall as its rows; the panel edits stats and markers as rows; docs for presets and module-config

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mumtool/components/projects/ModulesPanel.tsx | 18+++++++++++++++++-
Mumtool/docs/cli.md | 2++
Mumtool/docs/knobs.md | 36++++++++++++++++++++++++++++++++++++
Mumtool/report-to-video/chrome-story.mjs | 20+++++++++++---------
4 files changed, 66 insertions(+), 10 deletions(-)

diff --git a/umtool/components/projects/ModulesPanel.tsx b/umtool/components/projects/ModulesPanel.tsx @@ -59,7 +59,22 @@ const input = // The panel lists the modules without a bespoke editor first. const FIRST = ["pair", "chapter", "status", "finale", "intro", "counter"]; -const LIST_TYPES = new Set(["list", "series"]); +const LIST_TYPES = new Set(["list", "series", "stats", "markers"]); +// The rows of a list type whose descriptor names no item fields. +const ITEMS: Record<string, Field[]> = { + stats: [ + { key: "label", type: "text", label: "Label" }, + { key: "value", type: "text", label: "Value" }, + { key: "note", type: "text", label: "Note" }, + { key: "color", type: "color", label: "Colour" }, + ], + markers: [ + { key: "after", type: "clip", label: "After" }, + { key: "label", type: "text", label: "Label" }, + { key: "color", type: "text", label: "Colour" }, + { key: "align", type: "enum", label: "Align", options: ["auto", "left", "right", "center"] }, + ], +}; const textOf = (v: unknown) => (v === undefined || v === null ? "" : typeof v === "object" ? JSON.stringify(v) : String(v)); @@ -152,6 +167,7 @@ function JsonField({ value, placeholder, onChange, testid }: { value: unknown; p /** A list field: rows of its item's fields, added and removed. */ function ListField({ f, value, onChange, clips, testid }: { f: Field; value: unknown; onChange: (v: unknown) => void; clips: string[]; testid: string }) { const rows = Array.isArray(value) ? (value as Record<string, unknown>[]) : []; + if (!f.item && ITEMS[f.type]) f = { ...f, item: ITEMS[f.type] }; if (!f.item) return <JsonField value={value} placeholder={f.default} onChange={onChange} testid={testid} />; const set = (i: number, key: string, v: unknown) => onChange(rows.map((r, j) => (j === i ? setPath(r ?? {}, key, v) : r))); return ( diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md @@ -58,6 +58,8 @@ Inbox cannot disagree about what is wrong with one. | `timeline <project> [ls] [--json]` · `timeline <project> insert --after <id\|-> <channel>/<video>@<start>-<end> [--id ID] [--section N] [--lock] [--lock-end] [--title T] [--stream-title T] [--date YYYY-MM-DD] [--quote Q] [--cite S] [--cite-url U]` · `timeline <project> move <id> --to <index>` · `remove <id>` · `duplicate <id>` (`--at <index>` names one of an id's twins) · `post <json\|@file>` · `post-remove <id>` · `teaser <id> <patch-json\|@file>` · `undo` | the **structure** of the cut (the Cut tab's timeline, the On-screen section's teasers and posts) through the writers `POST /api/report/timeline` runs: `ls` prints index, id, type, video, start–end, date and title (`--json` adds the token and the posts); an insert's attribution is a second write through `window`'s writer, its date checked before anything is written; it is written in the manifest's own convention — under the deck `--title` is the deck's title (`onscreen.title`, `--stream-title` the stream's), a cut whose deck titles are dates gets `--date` as one in their format, and the clip takes the section of the clip it goes after (`--section N` names another) and, from the same recording, its deck title and its citation link. Every write snapshots the manifest first (`revisions/…-auto-before-<op>`), is refused only for what it breaks in the build's own words (**exit 1**), and on a generated manifest leaves an `edit` note ([report-video.md](report-video.md#structural-edits)) | | `scenes <project> <clip> [--black-min 0.05] [--threshold 8] [--pix-th 0.10] [--pad 30 \| --from S --to S] [--json]` | the picture's **scene cuts** (ffmpeg `scdet`, score ≥ threshold) and **black spans** (`blackdetect`) in the clip's fetched window, in SOURCE seconds — for `blur.from`/`blur.to` and trims ([knobs.md](knobs.md#a-clips-picture-blurred)). The window is the one the build would cut from (the project's `out/clips-raw`, the editor's `channels/<slug>/data/<id>/clips/`, a saved source); the extent ± `--pad` inside it is scanned. Nothing is fetched: **exit 1** with no window on disk (`fetch` first) | | `posts add <project> <archive-channel>/<postId> [--attach <clipId>] [--flag F] [--author A] [--id ID] [--dry-run] [--json]` | a **post card** from the corpus's posts archive (`channels/<slug>/posts/*.jsonl`): its words, date, link and handle; id `x-<postId>` (`bsky-`, `post-`); the author an earlier post by the same handle carries in the cut, else the archive's. Its capture (`posts-media/<postId>/`: `shot.png`, `capture.json`, the post's pictures) is copied to the project's `posts-media/<slug>/<postId>/` — or used where it is, when that folder links the channel's captures; never copied through a link anywhere else. Then `upsertPost` (a post with the id is replaced, its `attachTo` kept). **Exit 1** with no screenshot, naming the `pnpm ops capture-posts` to run | +| `modules list [--json]` · `modules apply <project> [--config FILE] [--dry-run] [--json]` · `modules apply <project> [--config FILE] --take <id> [--label L] [--at S --dur S \| --full] [--quick] [--force] [--from TAKE] [--keep-frames] [--patch-out FILE]` | the **video modules** (release 39): `list` every module, its kind, slot and where its settings live; `apply` maps the project's `module-config.json` (the modules a video wants, in MODULES-DESIGN's vocabulary) into the manifest's homes (`report-to-video/modules/config-loader.mjs`) — the preset, the deck's subtitle and QR, the counter's series and each clip's marks, the stamps, the rail's markers, the chapters, the pairs, the status ledger, the intro, the finale — and lists every field with no home, by path. Without `--take` the manifest is rewritten through `replaceManifest` (a snapshot first); with `--take` it is that take's patch (`takes/<id>.modules-patch.json`, or `--patch-out`) and the take is made from it as `take` makes one, the manifest untouched. **Exit 1** when the result would not build (the build's sentences) ([knobs.md](knobs.md#look-presets)) | +| `preset list [--json]` · `preset show <name> [--json]` · `preset save <name> --from <project> [--description D] [--force]` · `preset apply <name\|none> <project>` | the **look presets** (`umtool/presets/<name>.json`, or `UMTOOL_PRESETS_DIR`): a render block a manifest stands on (`"preset": "<name>"`), laid under it — preset → manifest → style → take patch. `save` keeps a project's look and leaves its content out; `apply` names the preset on the cut through `updatePreset` (nothing copied in), refused when the cut over it would not build ([knobs.md](knobs.md#look-presets)) | A project argument is an exact id, a directory, or a **unique** basename. Two projects answering to one name is reported, never resolved by picking one. diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md @@ -300,6 +300,42 @@ negative lag, needs a positive offset), then a build. `umtool show <p>` prints a **knobs** block — each clip's claim knobs, audio and blur (which clip stamps), the stamp's knobs and words, the markers and their layout, the ladder — and `umtool show <p> --json` carries it as `knobs`. +## Look presets + +A **look preset** is a render block a manifest stands on: `"preset": "<name>"` at the manifest's TOP level (not +`render.preset`, which is the x264 encoder preset) names `umtool/presets/<name>.json` — `{ name, description, +render }` — and its `render` is laid UNDER the manifest's. The order, each an RFC 7386 merge patch over the one +before: + + preset → manifest → style → take patch + +So a manifest names only what it changes from its preset; a take's montage style and its own patch change it again +(either may name a `preset` of its own — the last one named is the one laid); a `null` anywhere above removes the +key it names from everything below, the preset's value included. It is resolved where every reader of a cut goes +through (`selectVariant`), where a take merges its patches (`makeTake`, `resolveTakeManifest`) and where a writer +checks the chrome (`updateChrome` validates the chrome over the preset). A resolved manifest says +`presetApplied: <name>`. + +| | In umtool | From a terminal | +|---|---|---| +| the presets | Media, **Video modules**, Look preset | `umtool preset list` · `umtool preset show <name>` | +| stand the cut on one (or none) | the same list | `umtool preset apply <name\|none> <p>` | +| save a project's look as one (its content — claim checks, markers, counter series, finale stats, the story modules' lists, an intro's named site — left out) | | `umtool preset save <name> --from <p> [--description D]` | +| a take on one | | `umtool take <p> --id <id> --set preset=<name>` | + +Built in: `huck-deck` (quartering-huck/polemic-huck's look: the feed, verdict-coloured pips, the finale beside the +clip), `plain-deck` (the Trisha final's: every subtitle part, the boot-dark intro, no feed), `archive-catalog` (a +then-and-now archive look: dated subtitles, a pitched rail, the pair strip at the foot of the footage). + +## A module-config.json + +A project's `module-config.json` names the modules its video wants in the design's vocabulary (`{ preset, modules: +{ shell, subtitle, qr, counter, stamp, rail, chapter, pair, status, feed, intro, finale } }`). `umtool modules apply +<p>` maps it into the manifest's homes (report-to-video `modules/config-loader.mjs`) and lists, by path, every field +that has none — a cut-wide deck title, a rail node over a year of clips, a marker past the deck's twelve, a citation +URL a status row does not draw, a feed post (posts join through `umtool posts add`). `--take <id>` makes it a take's +patch instead. A finale stat `value: "counter.totals.<series>"` is counted from the config's marks at apply time. + <!-- modules:begin (generated by report-to-video/modules/docs.mjs -- edit the modules, not this) --> ## Modules diff --git a/umtool/report-to-video/chrome-story.mjs b/umtool/report-to-video/chrome-story.mjs @@ -338,6 +338,7 @@ export function statusHtml(schedule, render, opts = {}) { const pal = render.palette; const px = pxOf(render); const fps = schedule.fps ?? render.fps ?? 30; + const bottom = S.position.startsWith("bottom"); const init = { lg: { autoAlpha: 0 } }; const ev = []; const spans = joinSpans(states.map((s) => ({ in: s.at, out: s.until })), 1e-3); @@ -349,19 +350,20 @@ export function statusHtml(schedule, render, opts = {}) { ev.push({ k, at: st.at, dur: INSTANT, to: { autoAlpha: 1 }, ease: "none" }); ev.push({ k, at: st.until, dur: INSTANT, to: { autoAlpha: 0 }, ease: "none" }); const rows = st.rows.map((r) => `<div class="r${r.filled ? " done" : ""}"><div class="it">${esc(r.item)}</div><div class="ln"><span class="an">${esc(r.announced || "announced")}</span><span class="ar">→</span><span class="oc">${r.filled ? esc(r.outcome) : "…"}</span></div></div>`).join(""); - const html = `<div class="st" data-k="${k}">${rows}</div>`; + const html = `<div class="st" data-k="${k}"><div class="hd">${esc(S.title)}</div>${rows}</div>`; items.push({ key: k, gate: [k, "autoAlpha"], html }); return html; }); const { init: i2, cues } = compileCues(init, ev); const css = ` - #ledger { position: absolute; inset: 0; visibility: hidden; opacity: 0; border-radius: ${px(10)}px; - background: ${rgba(pal.bg, 0.86)}; border-left: ${px(5)}px solid ${pal.accent}; - box-shadow: 0 ${px(8)}px ${px(26)}px rgba(0, 0, 0, 0.4); } - .hd { position: absolute; left: ${px(20)}px; right: ${px(20)}px; top: ${px(12)}px; height: ${px(34)}px; - font-family: 'DeckSansBold', sans-serif; font-size: ${px(20)}px; letter-spacing: 0.12em; text-transform: uppercase; color: ${pal.muted}; } - .st { position: absolute; left: ${px(20)}px; right: ${px(20)}px; top: ${px(50)}px; bottom: ${px(8)}px; - visibility: hidden; opacity: 0; display: flex; flex-direction: column; gap: ${px(10)}px; } + #ledger { position: absolute; inset: 0; visibility: hidden; opacity: 0; } + /* Each state is its own card, as tall as its rows, from the corner it is anchored to. */ + .st { position: absolute; left: 0; right: 0; ${bottom ? "bottom: 0;" : "top: 0;"} visibility: hidden; opacity: 0; + display: flex; flex-direction: column; gap: ${px(10)}px; padding: ${px(12)}px ${px(20)}px ${px(14)}px ${px(20)}px; + border-radius: ${px(10)}px; background: ${rgba(pal.bg, 0.86)}; border-left: ${px(5)}px solid ${pal.accent}; + box-shadow: 0 ${px(8)}px ${px(26)}px rgba(0, 0, 0, 0.4); } + .hd { font-family: 'DeckSansBold', sans-serif; font-size: ${px(20)}px; line-height: ${px(26)}px; letter-spacing: 0.12em; + text-transform: uppercase; color: ${pal.muted}; } .r { display: flex; flex-direction: column; gap: ${px(2)}px; } .it { font-family: 'DeckSansBold', sans-serif; font-size: ${px(24)}px; line-height: ${px(30)}px; color: ${pal.fg}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } @@ -370,7 +372,7 @@ export function statusHtml(schedule, render, opts = {}) { .ar { flex: none; color: ${pal.accent}; font-family: 'DeckSansBold', sans-serif; } .oc { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .done .oc { color: ${pal.amber ?? pal.fg}; }`; - const body = `<div id="ledger" data-k="lg"><div class="hd">${esc(S.title)}</div> + const body = `<div id="ledger" data-k="lg"> ${blocks.join("\n ")} </div>`; const html = cuePageHtml({