diff --git a/rules/customer-pricing.pptx b/rules/customer-pricing.pptx index f96693b..4d5d297 100644 Binary files a/rules/customer-pricing.pptx and b/rules/customer-pricing.pptx differ diff --git a/rules/slides/customer-pricing/convert.cjs b/rules/slides/customer-pricing/convert.cjs new file mode 100644 index 0000000..feaf880 --- /dev/null +++ b/rules/slides/customer-pricing/convert.cjs @@ -0,0 +1,27 @@ +const path = require('path'); +const fs = require('fs'); +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: 'CUSTOM_16x9', width: 10, height: 5.625 }); + pres.layout = 'CUSTOM_16x9'; + + const dir = __dirname; + const slides = fs.readdirSync(dir) + .filter(f => f.startsWith('slide-') && f.endsWith('.html')) + .sort(); + + for (const file of slides) { + await html2pptx(path.join(dir, file), pres); + } + + const output = path.join(dir, '..', '..', 'customer-pricing.pptx'); + await pres.writeFile({ fileName: output }); + console.log('PPTX created:', output); +} + +main().catch(console.error);