Files
sam-docs/rules/slides/usage-plan/convert.cjs
권혁성 7a969b9d57 refactor: [structure] sam/ 하위 문서를 docs 루트로 재배치
- .gitignore를 sam/ 기반에서 루트 기반으로 변경
- sam/docs/ 하위 문서를 루트로 이동 (contracts, features, guides, plans 등)
- sam/ 폴더 삭제 (docker, coocon 포함)
2026-03-09 22:53:07 +09:00

32 lines
1.2 KiB
JavaScript

const path = require('path');
module.paths.unshift(path.join(require('os').homedir(), '.claude/skills/pptx-skill/scripts/node_modules'));
const html2pptx = require(path.join(require('os').homedir(), '.claude/skills/pptx-skill/scripts/html2pptx.js'));
const PptxGenJS = require('pptxgenjs');
async function main() {
const pres = new PptxGenJS();
pres.defineLayout({ name: 'CUSTOM_16x9', width: 10, height: 5.625 });
pres.layout = 'CUSTOM_16x9';
pres.author = '(주)코드브릿지엑스';
pres.subject = 'SAM 활용방안 - AI 자동화로 중소 제조업을 혁신하다';
const slideDir = __dirname;
const slideFiles = [
'slide-01.html', 'slide-02.html', 'slide-03.html',
'slide-04.html', 'slide-05.html', 'slide-06.html', 'slide-07.html'
];
for (const file of slideFiles) {
const htmlPath = path.join(slideDir, file);
console.log(`Converting: ${file}`);
await html2pptx(htmlPath, pres);
}
const outputPath = path.join(slideDir, 'SAM_활용방안.pptx');
await pres.writeFile({ fileName: outputPath });
console.log(`\nPPTX saved: ${outputPath}`);
}
main().catch(err => { console.error(err); process.exit(1); });