Files
HiveGrid-Marketing/getnord/folien/pptx.mjs
T
dejanandClaude Opus 5.5 ab1a5b9612 GET Nord: Folien für den Pitch, Entwurf 1
Sechs Folien im Look von Heft und Mails (folien.html), daraus PowerPoint
mit Sprechernotizen und PDF über bauen.sh. QR-Code auf hivegrid.de/ebook
mit utm_source=getnord, Screenshot der Automation „Angebot nachfassen“.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 18:50:05 +01:00

30 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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);