13-slide Marp deck (PDF+PPTX) mapping the Agent Economy track brief and NEAR's stated judging criteria to SpendGuard's real on-chain proof, plus a 70.6s narrated demo video built entirely from real captures: the existing asciinema-recorded SpendGuard loop, a fresh terminal recording made today re-verifying the live testnet contract + 450/450 tests, and code-rendered (Playwright/HTML) title cards. Deepgram Aura-2 narration with per-line ASR round-trip QC, burned-in word-timed captions, loudness mastered to -14.6 LUFS / -1.9 dBTP true peak. No AI-generated footage; no paid APIs beyond the existing Deepgram key. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
50 lines
1.6 KiB
JavaScript
50 lines
1.6 KiB
JavaScript
import { chromium } from "playwright";
|
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
import { fileURLToPath } from "node:url";
|
|
import { dirname, join } from "node:path";
|
|
|
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
const CAPTION_HTML = "file://" + join(HERE, "caption.html");
|
|
|
|
const data = JSON.parse(readFileSync(join(HERE, "final-lines.json"), "utf8")).lines;
|
|
|
|
const CHUNK = 7;
|
|
const cues = [];
|
|
for (const L of data) {
|
|
const words = L.words;
|
|
for (let i = 0; i < words.length; i += CHUNK) {
|
|
const chunk = words.slice(i, i + CHUNK);
|
|
cues.push({
|
|
start: chunk[0].start,
|
|
end: chunk[chunk.length - 1].end,
|
|
text: chunk.map((w) => w.w).join(" "),
|
|
});
|
|
}
|
|
}
|
|
|
|
async function main() {
|
|
const dir = join(HERE, "captions-png");
|
|
mkdirSync(dir, { recursive: true });
|
|
const browser = await chromium.launch();
|
|
const page = await browser.newPage({
|
|
viewport: { width: 1920, height: 1080 },
|
|
});
|
|
const manifest = [];
|
|
for (let i = 0; i < cues.length; i++) {
|
|
const cue = cues[i];
|
|
const url = `${CAPTION_HTML}?text=${encodeURIComponent(cue.text)}`;
|
|
await page.goto(url, { waitUntil: "load" });
|
|
const file = `cue_${String(i).padStart(3, "0")}.png`;
|
|
await page.screenshot({ path: join(dir, file), omitBackground: true });
|
|
manifest.push({ file, start: cue.start, end: cue.end, text: cue.text });
|
|
console.log(`${file} [${cue.start.toFixed(2)}-${cue.end.toFixed(2)}] ${cue.text}`);
|
|
}
|
|
await browser.close();
|
|
writeFileSync(join(dir, "manifest.json"), JSON.stringify(manifest, null, 2));
|
|
}
|
|
|
|
main().catch((e) => {
|
|
console.error(e);
|
|
process.exit(1);
|
|
});
|