const pptxgen = require('pptxgenjs');
const html2pptx = require('/mnt/e/Users/Alexis Trouvé/Documents/Projets/couple_matters/.claude/skills/pptx/scripts/html2pptx.js');
const path = require('path');

async function generatePresentation() {
  const pptx = new pptxgen();
  pptx.layout = 'LAYOUT_16x9';

  const htmlFile = path.join(__dirname, 'alimentari_piccolo.html');

  try {
    await html2pptx(htmlFile, pptx);

    const outputPath = path.join(__dirname, '..', 'Alimentari_Piccolo.pptx');
    await pptx.writeFile({ fileName: outputPath });

    console.log(`✅ Présentation créée avec succès: ${outputPath}`);
  } catch (error) {
    console.error('❌ Erreur lors de la génération:', error.message);
    process.exit(1);
  }
}

generatePresentation();
