Files
sam-docs/sam/docs/brochure/convert-1page.cjs
김보곤 8be729c698 docs: [brochure] SAM 전체 프로젝트 범용 영업 브로셔 생성
- 1장/2장 브로셔 HTML 슬라이드 및 PPTX 생성
- usecase 방화셔터 브로셔 패턴 활용, 범용 제조업 타깃으로 변환
- 핵심 모듈 8종, 가격 체계, 도입 프로세스, 기대 효과 포함
2026-03-01 12:52:45 +09:00

29 lines
956 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();
// 9:16 세로형 (Portrait)
pres.defineLayout({ name: 'PORTRAIT_9x16', width: 5.625, height: 10 });
pres.layout = 'PORTRAIT_9x16';
const htmlFile = path.join(__dirname, 'slides', 'brochure-1page.html');
console.log('Converting 1-page brochure...');
try {
await html2pptx(htmlFile, pres);
} catch (err) {
console.error(`Error: ${err.message}`);
}
const outputPath = path.join(__dirname, 'sam-brochure-1page.pptx');
await pres.writeFile({ fileName: outputPath });
console.log(`\nPPTX created: ${outputPath}`);
}
main().catch(console.error);