| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- /**
- * benchmark-run.js — Orchestrateur benchmark hebdomadaire
- *
- * Lance les deux scripts de collecte en séquence et affiche un résumé.
- *
- * Usage :
- * node scripts/benchmark-run.js [livinweb|livinia|all]
- * node scripts/benchmark-run.js ← traite toutes les marques
- *
- * Équivalent à lancer :
- * node scripts/benchmark-facebook-ads.js [brand]
- * node scripts/benchmark-communication.js [brand]
- */
- const { execSync } = require('child_process');
- const path = require('path');
- const brand = process.argv[2] || 'all';
- const scriptsDir = __dirname;
- function run(script, label) {
- console.log(`\n${'─'.repeat(50)}`);
- console.log(`🚀 ${label}`);
- console.log('─'.repeat(50));
- try {
- execSync(`node "${path.join(scriptsDir, script)}" ${brand}`, {
- stdio: 'inherit',
- cwd: path.resolve(scriptsDir, '..'),
- });
- } catch (err) {
- console.error(`❌ Erreur lors de ${label} :`, err.message);
- }
- }
- console.log(`\n📊 BENCHMARK HEBDOMADAIRE — Marque(s) : ${brand}`);
- console.log(` ${new Date().toLocaleDateString('fr-FR', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })}`);
- run('benchmark-facebook-ads.js', 'Veille pubs Facebook (Meta Ad Library)');
- run('benchmark-communication.js', 'Veille communication (sites + LinkedIn)');
- console.log(`\n${'═'.repeat(50)}`);
- console.log('✅ Collecte terminée.');
- console.log(' Prochaine étape : lancer /agentmarketing-benchmark dans Cursor');
- console.log(' L\'agent analysera les fichiers générés et produira le rapport.');
- console.log('═'.repeat(50));
|