- (주)코드브릿지엑스 → SAM - www.codebridge-x.com → www.sam.co.kr - contact@codebridge-x.com → contact@sam.co.kr - 푸터 문구 SAM — Smart Automation Management 통일
32 lines
1.1 KiB
JavaScript
32 lines
1.1 KiB
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 slidesDir = path.join(__dirname, 'slides');
|
|
const slides = ['brochure-dashboard-front.html', 'brochure-dashboard-back.html'];
|
|
|
|
for (const file of slides) {
|
|
const htmlFile = path.join(slidesDir, file);
|
|
console.log(`Converting ${file} ...`);
|
|
try {
|
|
await html2pptx(htmlFile, pres);
|
|
} catch (err) {
|
|
console.error(`Error on ${file}: ${err.message}`);
|
|
}
|
|
}
|
|
|
|
const outputPath = path.join(__dirname, 'sam-brochure-v6-dashboard-2page.pptx');
|
|
await pres.writeFile({ fileName: outputPath });
|
|
console.log(`\nPPTX created: ${outputPath}`);
|
|
}
|
|
|
|
main().catch(console.error);
|