// Baut aus export/folie-1.png … folie-6.png die PowerPoint, jede Folie als // Bild in 16:9, dazu die Sprechernotizen aus folien.html (window.NOTIZEN). // pptxgenjs kommt aus webinar/slides/node_modules. Aufruf über ./bauen.sh. import { createRequire } from "node:module"; import { readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import { fileURLToPath } from "node:url"; const HIER = dirname(fileURLToPath(import.meta.url)); const require = createRequire(join(HIER, "../../webinar/slides/package.json")); const pptxgen = require("pptxgenjs"); // Notizen aus folien.html lesen, damit Text und Folien eine Quelle haben const html = readFileSync(join(HIER, "folien.html"), "utf-8"); const NOTIZEN = JSON.parse(html.match(/window\.NOTIZEN = (\[[\s\S]*?\]);/)[1].replace(/,\s*\]$/, "]")); const pptx = new pptxgen(); pptx.layout = "LAYOUT_WIDE"; // 13,33 × 7,5 Zoll, 16:9 pptx.title = "HiveGrid · Pitch GET Nord 2026"; pptx.company = "HiveGrid"; NOTIZEN.forEach((notiz, i) => { const folie = pptx.addSlide(); folie.background = { color: "FFFFFF" }; folie.addImage({ path: join(HIER, "export", `folie-${i + 1}.png`), x: 0, y: 0, w: 13.333, h: 7.5 }); folie.addNotes(notiz); }); const ziel = join(HIER, process.argv[2] || "HiveGrid-Pitch-GET-Nord.pptx"); await pptx.writeFile({ fileName: ziel }); console.log(ziel);