commit 0c9570e4809238e9fbc8d0200c039a27adc7c126
parent b85aa2a3fc0e5fd4e5b44a9b6dd3e6c77baaf3d7
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 3 Nov 2026 10:54:59 -0500
umtool: a narrated post reads his "this/that" as "this slash that" (operator: a pattern of his, it makes more sense spoken)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/umtool/report-to-video/post-narration.mjs b/umtool/report-to-video/post-narration.mjs
@@ -346,6 +346,8 @@ export function speakableText(text) {
.replace(/\b(\w+)\(s\)/g, "$1s")
.replace(/(^|\s)w\/(?=\s|$)/gi, "$1with")
.replace(/(^|\s)w\/(?=\S)/gi, "$1with ")
+ // "this/that" is read as he writes it: "this slash that" (operator, 3 Nov -- a pattern of his).
+ .replace(/(\w)\/(?=\w)/g, "$1 slash ")
.replace(/\s&\s/g, " and ")
.replace(/&/g, "and")
.replace(/[ \t]+/g, " ");
diff --git a/umtool/report-to-video/post-narration.test.mjs b/umtool/report-to-video/post-narration.test.mjs
@@ -174,6 +174,8 @@ test("the segment's argv carries the take as an input and the mix after the item
test("SCRIPTS ARE THE POST, VERBATIM: cleaned for pronunciation only, never an excerpt", () => {
assert.equal(speakableText("@KorriiNami Trust me & you w/ my plan(s) 😂 https://t.co/x\n\nI hate the weak"), "Trust me and you with my plans.\n\nI hate the weak");
+ // his "this/that" is read "this slash that"; a URL's slashes are gone before it
+ assert.equal(speakableText("muscle/fitness and sites/forums/orgs https://x.com/a/b"), "muscle slash fitness and sites slash forums slash orgs");
assert.equal(speakableText("one\ntwo\n\nthree"), "one. two.\n\nthree");
const long = Array.from({ length: 150 }, (_, i) => `w${i}`).join(" ") + ". The end.";
const d = draftScript(long);