commit cd9b5dfeeeeb45f8c09ecd99f0e83303cca35d3f
parent 85f6938b536a19d6c47e7443c5560d3c9f25fe1a
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 3 Nov 2026 21:21:33 -0500
umtool: the slur filter's defaults are the operator's choice, "pill + beep" -- visual placeholder (the dark pill with the mask) and voice beep (said, a tone over it by the take's word timings; "skip seems like it'd be unnatural"); blackout and skip stay as knobs. knobs.md, cli.md, the help and the tests follow
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
7 files changed, 38 insertions(+), 33 deletions(-)
diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md
@@ -89,7 +89,7 @@ Inbox cannot disagree about what is wrong with one.
| `posts fit <project> [--all \| <item> …] [--linger <s>] [--dry-run] [--json]` · `posts set-item <project> <item> fit=read[:<linger>]` | narrated posts' video attachments cut to their **best part** for the read (lead + take + tail + linger): a scored scan of the sound (loudness, its peaks), the speech (a transcript) and the scene cuts, the start snapped to a pause or a cut, recorded with why (`narration.window`) -- ONE write; each post's old and new length printed. A video no longer than the read is left as it is |
| `posts avatar <project> [<handle> <image-file> \| <handle> off] [--json]` · `posts avatars <project> [--dry-run] [--json]` | the **authors' pictures** (`postAvatars`): `avatar` copies a picture into `posts-media/_avatars/` for every card that draws that handle (manual; never replaced by the archive's), `off` clears it, no handle lists them; `avatars` copies the archive's (the channels' `posts-media/_avatars/avatars.json`, capture-posts') for every author the cut's cards draw unblurred that it has none of. A blurred author never shows one |
| `posts redact <project> ls \| add "<term>" [--substring] [--note "…"] \| remove <n> [--json]` | **REDACTED WORDS** ([knobs.md](knobs.md#redacted-words-blanked-from-what-is-published)): the project's list (`render.posts.redact`, `updatePostRedact`) of words or phrases blanked from everything the cut publishes -- a solid bar on the rendered card, left out of a synthesized read, a post's chapter line and an attachment's captions; matched without case, as whole words (`--substring`: inside words too), a phrase across any spaces or punctuation. The posts' words and the scripts are never rewritten. `ls` numbers the terms as `remove` takes them, and counts the corpus's (`transcripts/redactions.json`) and the posts marked up in the cut's channels (`posts-markup.json`). A term already listed is refused (**exit 1**) |
-| `posts slurs <project> [ls] \| on \| off \| level strong\|all \| visual blackout\|placeholder \| voice skip\|beep\|placeholder \| add <word> \| except <word> \| remove <word> [--json]` | **THE SLUR FILTER** ([knobs.md](knobs.md#the-slur-filter-slurs-masked-in-what-is-published-off-for-the-uncensored-cut)): `render.posts.slurs` (`updatePostSlurs`, one undo point each), on by default -- the slurs of the shipped list (`report-to-video/slurs.json`; `level strong`: only the strong ones) and the project's own (`add`; `except` never masks one) masked in everything the cut publishes: a bar (`visual blackout`) or a dark pill with its mask (`placeholder`, "f*****") on the card, left out of a synthesized read (`voice skip`), its stand-in said (`placeholder`), or said and beeped by the take's word timings (`beep`). `ls` counts what the cut masks per slur and per post -- masks only, never the word -- and names each narrated post whose take says one with no word timings (a censored build refuses it; `posts narrate <p> <item> --words`). `off` is the uncensored cut (the redaction stays). A word already on a list, or on neither for `remove`, is refused (**exit 1**); an unknown verb or value (**exit 2**) |
+| `posts slurs <project> [ls] \| on \| off \| level strong\|all \| visual blackout\|placeholder \| voice skip\|beep\|placeholder \| add <word> \| except <word> \| remove <word> [--json]` | **THE SLUR FILTER** ([knobs.md](knobs.md#the-slur-filter-slurs-masked-in-what-is-published-off-for-the-uncensored-cut)): `render.posts.slurs` (`updatePostSlurs`, one undo point each), on by default -- the slurs of the shipped list (`report-to-video/slurs.json`; `level strong`: only the strong ones) and the project's own (`add`; `except` never masks one) masked in everything the cut publishes: a dark pill with its mask (`visual placeholder`, the default, "f*****") or a bar (`blackout`) on the card; said and beeped by the take's word timings (`voice beep`, the default), left out of a synthesized read (`skip`), or its stand-in said (`placeholder`). `ls` counts what the cut masks per slur and per post -- masks only, never the word -- and names each narrated post whose take says one with no word timings (a censored build refuses it; `posts narrate <p> <item> --words`). `off` is the uncensored cut (the redaction stays). A word already on a list, or on neither for `remove`, is refused (**exit 1**); an unknown verb or value (**exit 2**) |
| `posts context <project> [--dry-run] [--json]` | every **post item's context from its capture** (`postContext.mjs`): the post it quotes and the post it answers, as its page showed them (`capture.json`'s `context`, read by the editor's `capture-posts` -- `"contextOnly": true` reads it alone), filled where the archive row lacks them -- `quoted` where the entry has none (or a named one with no words, the same post), `parents` where it has none (a thread shot stays on the entry; the card draws the parents). What the archive gave is never replaced. ONE write for every entry (`setPostItemsContext`: one undo point, refused whole in the build's words); a re-run with nothing new writes nothing. A post whose capture read no context is listed with the call that reads it (`pnpm ops capture-posts --json '{"slug":…,"ids":[…],"contextOnly":true}' --wait`). The card's blur of other authors is unchanged ([report-video.md](report-video.md#post-items-a-post-as-an-entry-of-the-cut)) |
| `new <slug> --from-posts <channel> [--channel <more>…] [--since D] [--until D] [--own] [--with-media] [--replies …] [--order …] [--limit N]` | a **posts reel**: the scaffold with the deck on (no `siteOrigin`: each post's QR opens the post, `deck.qr.links: "original"`), then `posts reel` with the same filters |
| `timeline <project> insert (--after <id\|-> \| --to-section N \| --group G) post:<channel>/<postId> [--id ID]` | **one post item** among the cut's entries, made as `posts reel` makes one |
diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md
@@ -732,15 +732,13 @@ and the word spelt out letter by letter with ONE space, dot, dash or underscore
"f.a.g.g.o.t"; letters partly together are not read as one). Like the redaction, the archive's rows, the manifest's
snapshot and every script keep their words.
-- **The card** (`visual`): `blackout`, the redaction's solid bar (no letters in the page); `placeholder`, a dark pill
- holding the mask (`data-post-slur`), the first letter in the case the post wrote it -- the same mask for the same
- slur across the cut, and never the word in the card's HTML. Its words, the authors' names, the repost line, the
+- **The card** (`visual`): `placeholder` (the default), a dark pill holding the mask (`data-post-slur`), the first letter in the case the post wrote it -- the same mask for the same
+ slur across the cut, and never the word in the card's HTML; `blackout`, the redaction's solid bar (no letters in the page). Its words, the authors' names, the repost line, the
posts it answers and quotes, a paraphrase; a video attachment's burnt-in captions (left out under blackout, the mask
under placeholder) and a chapter line (the mask). A slur spelt apart keeps its tokens, so a word zoom's indices hold;
a zoom on a masked word is refused, as on a redacted one.
-- **The read** (`voice`): `skip`, left out of a synthesized read (as a redacted term is); `placeholder`, its stand-in
- said in its place; `beep`, said, and a 1 kHz tone laid over it (the voice silenced under it) at its time in the take's
- word timings. `umtool posts narrate <p> <item> --take` word-times a beep take right after it is made (the editor's
+- **The read** (`voice`): `beep` (the default -- the operator, 3 Nov: "skip seems like it'd be unnatural"), said, and a 1 kHz tone laid over it (the voice silenced under it) at its time in the take's
+ word timings; `skip`, left out of a synthesized read (as a redacted term is); `placeholder`, its stand-in said in its place. `umtool posts narrate <p> <item> --take` word-times a beep take right after it is made (the editor's
transcribe op) and, when that cannot be done, synthesizes the read again with the slur skipped; the bench's re-take
cannot time it, so a beep is skipped there. A take records what its audio does (`takes[i].slurs`: `said`, `skip`,
`placeholder`). A take that SAYS a slur -- a recording, a beep take, a take from before the filter (no `slurs`), a
@@ -758,8 +756,8 @@ snapshot and every script keep their words.
|---|---|---|---|
| `render.posts.slurs.on` — `true` (default) \| `false`: the uncensored cut | Play the cut, **As published** + **Uncensored** | `umtool posts slurs <p> on` · `off` · `umtool take <p> --id <id> … --uncensored` · build-video `--uncensored` | `GET /api/report/post-item?…&published=1&uncensored=1` |
| `render.posts.slurs.level` — `all` (default: strong and mild) \| `strong` | — | `umtool posts slurs <p> level strong\|all` | — |
-| `render.posts.slurs.visual` — `blackout` (default) \| `placeholder` | Play, **As published** | `umtool posts slurs <p> visual blackout\|placeholder` | — |
-| `render.posts.slurs.voice` — `skip` (default) \| `beep` \| `placeholder` | — | `umtool posts slurs <p> voice skip\|beep\|placeholder` | — |
+| `render.posts.slurs.visual` — `placeholder` (default) \| `blackout` | Play, **As published** | `umtool posts slurs <p> visual blackout\|placeholder` | — |
+| `render.posts.slurs.voice` — `beep` (default) \| `skip` \| `placeholder` | — | `umtool posts slurs <p> voice skip\|beep\|placeholder` | — |
| `render.posts.slurs.add` — the project's own words (always masked; a word, or `{word, forms?, mask?, say?}`) · `.except` — never masked here (a form, a slur's word or its id) | — | `umtool posts slurs <p> add <word>` · `except <word>` · `remove <word>` (one writer, `updatePostSlurs`) | — |
| what the cut masks | — | `umtool posts slurs <p> ls [--json]`: per slur (its mask, never the word) and per post, and each read that needs word timings | — |
diff --git a/umtool/e2e/post-items.spec.ts b/umtool/e2e/post-items.spec.ts
@@ -131,9 +131,8 @@ test("a redacted term: Play shows the words; As published draws blank bars and t
});
test("the slur filter: As published (censored) draws the placeholder pill and never the word; Uncensored draws the word; the redaction stays on in both", async ({ page }) => {
- // A made-up word put on the filter (umtool posts slurs add; knobs.md, "The slur filter"), drawn as a placeholder.
+ // A made-up word put on the filter (umtool posts slurs add; knobs.md, "The slur filter"), drawn as the default placeholder pill.
umtool(["posts", "slurs", PROJECT, "add", "video"]);
- umtool(["posts", "slurs", PROJECT, "visual", "placeholder"]);
umtool(["posts", "redact", PROJECT, "add", "here is"]);
const ls = umtool(["posts", "slurs", PROJECT, "ls"]);
expect(ls).toContain("the slur filter is ON");
diff --git a/umtool/lib/report/postSlurs.test.mjs b/umtool/lib/report/postSlurs.test.mjs
@@ -55,7 +55,7 @@ test("posts slurs ls: what the cut would mask, per slur and per post, masks only
]);
const r = await cli(["slurs", "ls", "ls"]);
assert.equal(r.code, 0, r.err);
- assert.match(r.out, /the slur filter is ON -- level all, visual blackout, voice skip/);
+ assert.match(r.out, /the slur filter is ON -- level all, visual placeholder, voice beep/);
assert.match(r.out, /masks 4 word\(s\) in 3 post item\(s\)/);
assert.match(r.out, /f\*{5} +f-slur +×3 +in 2 post\(s\): p-1, p-3/);
assert.match(r.out, /p-2 +n\*{5} ×1 +\(quoted\.text\)/);
@@ -65,11 +65,11 @@ test("posts slurs ls: what the cut would mask, per slur and per post, masks only
assert.equal(j.total, 4);
assert.deepEqual(j.bySlur["f-slur"].posts, ["p-1", "p-3"]);
assert.equal(j.reads[0].needs, "word timings");
- // Timed: covered (silenced, as voice skip has it).
+ // Timed: covered (beeped, as the default voice beep has it).
const m = await manifest(p);
m.timeline[2].narration.takes[0].words = [{ w: "he", start: 0, end: 0.3 }, { w: "said", start: 0.3, end: 0.6 }, { w: F, start: 0.6, end: 1 }];
await writeFile(path.join(p.dir, "video.manifest.json"), JSON.stringify(m));
- assert.match((await cli(["slurs", "ls", "ls"])).out, /p-3 +silenced \(1 span\(s\)\)/);
+ assert.match((await cli(["slurs", "ls", "ls"])).out, /p-3 +beeped \(1 span\(s\)\)/);
});
test("posts slurs on|off|level|visual|voice|add|except|remove: one writer, refused in the build's words, the posts untouched", async () => {
@@ -85,18 +85,22 @@ test("posts slurs on|off|level|visual|voice|add|except|remove: one writer, refus
await ok("on");
assert.equal((await manifest(p)).render.posts, undefined, "the defaults leave no key");
await ok("level", "strong");
- await ok("visual", "placeholder");
- await ok("voice", "beep");
+ await ok("visual", "blackout");
+ await ok("voice", "skip");
assert.match(await ok("add", "zorbo"), /z\*{4} is masked in this cut/);
await ok("except", F);
- assert.deepEqual((await manifest(p)).render.posts.slurs, { level: "strong", visual: "placeholder", voice: "beep", add: ["zorbo"], except: [F] });
+ assert.deepEqual((await manifest(p)).render.posts.slurs, { level: "strong", visual: "blackout", voice: "skip", add: ["zorbo"], except: [F] });
const red = await projectRedaction(p.dir, await manifest(p));
- assert.equal(red.slurs.visual, "placeholder");
+ assert.equal(red.slurs.visual, "blackout");
assert.ok(red.slurs.entries.some((e) => e.word === "zorbo"));
assert.ok(!red.slurs.entries.some((e) => e.forms.includes(F)));
await ok("remove", F);
await ok("level", "all");
- assert.deepEqual((await manifest(p)).render.posts.slurs, { visual: "placeholder", voice: "beep", add: ["zorbo"] });
+ assert.deepEqual((await manifest(p)).render.posts.slurs, { visual: "blackout", voice: "skip", add: ["zorbo"] });
+ // The defaults (placeholder + beep) back: their keys go.
+ await ok("visual", "placeholder");
+ await ok("voice", "beep");
+ assert.deepEqual((await manifest(p)).render.posts.slurs, { add: ["zorbo"] });
assert.equal((await cli(["slurs", "w", "add", "zorbo"])).code, 1, "already on the list");
assert.equal((await cli(["slurs", "w", "voice", "hum"])).code, 2);
assert.equal((await cli(["slurs", "w", "remove", "nothing"])).code, 1);
diff --git a/umtool/lib/report/postSlursCli.mjs b/umtool/lib/report/postSlursCli.mjs
@@ -25,9 +25,9 @@ export const SLURS_USAGE = [
" | voice skip|beep|placeholder | add <word> | except <word> | remove <word> [--json]",
" THE SLUR FILTER (render.posts.slurs; on by default): every slur on the list (umtool/report-to-video/slurs.json,",
" strong and mild; `level strong` masks only the strong) masked in what the cut PUBLISHES -- matched whole-word,",
- " without case, through look-alike letters and a word spelt out. visual: blackout (the redaction's bar) or",
- " placeholder (a dark pill with its mask, \"f*****\"); voice: skip (left out of a synthesized read), beep (said, a",
- " tone over it by the take's word timings) or placeholder (its stand-in said, \"f-slur\"). A take that SAYS one (a",
+ " without case, through look-alike letters and a word spelt out. visual: placeholder (default: a dark pill with",
+ " its mask, \"f*****\") or blackout (the redaction's bar); voice: beep (default: said, a tone over it by the take's",
+ " word timings), skip (left out of a synthesized read) or placeholder (its stand-in said, \"f-slur\"). A take that SAYS one (a",
" recording, a beep take, a take from before the filter) is silenced or beeped over it by its word timings, and",
" a censored build refuses one with none. `ls` counts what the cut would mask (masks only, never the word), per",
" slur and per post, and says which reads still need word timings. off -- or `umtool take … --uncensored` -- is",
diff --git a/umtool/report-to-video/post-slurs.mjs b/umtool/report-to-video/post-slurs.mjs
@@ -19,11 +19,12 @@
// level?: "all" (default) | "strong" strong: only the strong slurs
// add?: ["<word>" | {word, forms?, mask?, say?}] the project's own (always masked)
// except?: ["<form or word>"] never masked in this project
-// visual?: "blackout" (default) the redaction's solid bar
-// | "placeholder" a dark pill with the masked form ("f*****")
-// voice?: "skip" (default) left out of a synthesized read
-// | "beep" said, and a tone laid over it at its time
+// visual?: "placeholder" (default) a dark pill with the masked form ("f*****")
+// | "blackout" the redaction's solid bar
+// voice?: "beep" (default) said, and a tone laid over it at its time
+// | "skip" left out of a synthesized read
// | "placeholder" its stand-in said instead ("f-slur")
+// (the operator's choice, 3 Nov: "pill + beep" -- "skip seems like it'd be unnatural")
// }
//
// THE SWITCH: `on: false` -- a take's patch (`umtool take <p> … --uncensored`)
@@ -37,7 +38,7 @@
export const SLUR_LEVELS = Object.freeze(["all", "strong"]);
export const SLUR_VISUALS = Object.freeze(["blackout", "placeholder"]);
export const SLUR_VOICES = Object.freeze(["skip", "beep", "placeholder"]);
-export const SLURS_DEFAULTS = Object.freeze({ on: true, level: "all", visual: "blackout", voice: "skip" });
+export const SLURS_DEFAULTS = Object.freeze({ on: true, level: "all", visual: "placeholder", voice: "beep" });
export const SLUR_LIST_LEVELS = Object.freeze(["strong", "mild"]);
export const SLURS_ADD_MAX = 100;
export const SLUR_KEYS = Object.freeze(["on", "level", "add", "except", "visual", "voice", "note"]);
diff --git a/umtool/report-to-video/post-slurs.test.mjs b/umtool/report-to-video/post-slurs.test.mjs
@@ -87,7 +87,7 @@ test("validateSlursRender refuses what the filter cannot use; render.posts carri
test("the card's masks: a blackout is the redaction's bar; a placeholder is a pill with the mask, never the word", () => {
assert.equal(BLACKOUT_MARK, REDACT_MARK);
- const b = maskSlurs(`you ${F}!`, ON).text;
+ const b = maskSlurs(`you ${F}!`, { ...ON, visual: "blackout" }).text;
assert.equal(b, `you ${REDACT_MARK.repeat(F.length)}!`);
const p = maskSlurs(`you ${F}! ${F[0].toUpperCase()}${F.slice(1)}`, { ...ON, visual: "placeholder" }).text;
assert.equal(decodePlaceholder(p), `you ${F[0]}*****! ${F[0].toUpperCase()}*****`);
@@ -121,7 +121,7 @@ test("redactEntry masks the slurs with the redaction, and the card's HTML never
assert.ok(html.includes(`${F[0]}*****`));
assert.ok(html.includes("data-post-blanked"), "the redacted term's bar");
// Blackout: bars, no pill.
- const bhtml = postCardHtml(e, { width: 1280, height: 720, redaction: { terms: [], slurs: ON } });
+ const bhtml = postCardHtml(e, { width: 1280, height: 720, redaction: { terms: [], slurs: { ...ON, visual: "blackout" } } });
assert.ok(!bhtml.toLowerCase().includes(F) && !bhtml.includes('data-post-slur=""') && bhtml.includes("data-post-blanked"));
// UNCENSORED: the words, the redaction still on.
const u = postCardHtml(e, { width: 1280, height: 720, redaction: { terms: [{ term: "said" }], slurs: resolveSlurs({}, LIST, { uncensored: true }) } });
@@ -134,14 +134,16 @@ test("the read: skip leaves the slur out, placeholder says its stand-in, beep sa
const e = post("x");
const red = (o) => ({ terms: [{ term: "Quentin" }], slurs: resolveSlurs(o, LIST) });
const text = `Quentin called him a ${F}, twice.`;
- assert.deepEqual(spokenRead(text, e, red({})), { text: "called him a, twice.", slurs: "skip" });
+ assert.deepEqual(spokenRead(text, e, red({ voice: "skip" })), { text: "called him a, twice.", slurs: "skip" });
+ // The default (the operator's "pill + beep"): said, for the render's beep.
+ assert.deepEqual(spokenRead(text, e, red({})), { text: `called him a ${F}, twice.`, slurs: "said" });
assert.deepEqual(spokenRead(text, e, red({ voice: "placeholder" })), { text: "called him a f-slur, twice.", slurs: "placeholder" });
assert.deepEqual(spokenRead(text, e, red({ voice: "beep" })), { text: `called him a ${F}, twice.`, slurs: "said" });
assert.deepEqual(spokenRead(text, e, red({ on: false })), { text: `called him a ${F}, twice.`, slurs: "said" });
assert.deepEqual(spokenRead("nothing here", e, red({})), { text: "nothing here", slurs: null });
// A caption: left out (blackout), or its mask (placeholder); the redaction too.
- assert.equal(shownLine(`Quentin, you ${F}`, e, red({})), "you");
- assert.equal(shownLine(`Quentin, you ${F}`, e, red({ visual: "placeholder" })), `you ${F[0]}*****`);
+ assert.equal(shownLine(`Quentin, you ${F}`, e, red({ visual: "blackout" })), "you");
+ assert.equal(shownLine(`Quentin, you ${F}`, e, red({})), `you ${F[0]}*****`);
});
test("takeBleeps: a take that says a slur is covered at its words' times; without timings it is refused", () => {
@@ -154,7 +156,8 @@ test("takeBleeps: a take that says a slur is covered at its words' times; withou
const b = takeBleeps(take, s);
// "He"(0) "said"(1) F(2) "and"(3) "then"(4) f,a,g,g,o,t (5..10) "again."(11)
assert.deepEqual(b, { mode: "beep", spans: [[1.96, 2.56], [4.96, 10.56]] });
- assert.equal(takeBleeps(take, resolveSlurs({}, LIST)).mode, "mute");
+ assert.equal(takeBleeps(take, resolveSlurs({ voice: "skip" }, LIST)).mode, "mute");
+ assert.equal(takeBleeps(take, resolveSlurs({}, LIST)).mode, "beep", "the default");
assert.equal(takeBleeps(take, resolveSlurs({ on: false }, LIST)), null);
assert.equal(takeBleeps({ ...take, slurs: "skip" }, s), null, "its audio left them out");
assert.match(takeBleeps({ ...take, words: undefined }, s).error, /no word timings/);