Files
sam-docs/sam/docs/brochure/v4/convert-1page.cjs
김보곤 66db1832da refactor: [brochure] docs/brochure-vN → docs/brochure/vN 구조로 통합
- docs/brochure/ → docs/brochure/v1/
- docs/brochure-v2/ → docs/brochure/v2/
- docs/brochure-v3/ → docs/brochure/v3/
- docs/brochure-v4/ → docs/brochure/v4/
- docs 하위 폴더를 큰 단위로 유지
2026-03-01 18:12:38 +09:00

28 lines
971 B
JavaScript

const path = require('path');
module.paths.unshift(path.join(require('os').homedir(), '.claude/skills/pptx-skill/scripts/node_modules'));
const PptxGenJS = require('pptxgenjs');
const html2pptx = require(path.join(require('os').homedir(), '.claude/skills/pptx-skill/scripts/html2pptx.js'));
async function main() {
const pres = new PptxGenJS();
pres.defineLayout({ name: 'PORTRAIT_9x16', width: 5.625, height: 10 });
pres.layout = 'PORTRAIT_9x16';
const htmlFile = path.join(__dirname, 'slides', 'brochure-dashboard-1page.html');
console.log('Converting CEO Dashboard v4 (Light) 1-page brochure...');
try {
await html2pptx(htmlFile, pres);
} catch (err) {
console.error(`Error: ${err.message}`);
}
const outputPath = path.join(__dirname, 'sam-brochure-v4-dashboard-1page.pptx');
await pres.writeFile({ fileName: outputPath });
console.log(`\nPPTX created: ${outputPath}`);
}
main().catch(console.error);