g360-cli 1.15.1 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1547 -1424
- package/package.json +2 -1
- package/src/assets/pptx/layouts/base.js +239 -0
- package/src/assets/pptx/layouts/index.js +14 -0
- package/src/assets/pptx/scripts/analyze-app.js +194 -0
- package/src/assets/pptx/templates/app-manual.js +275 -0
- package/src/assets/pptx/themes/base.js +63 -0
- package/src/assets/pptx/themes/cipsa.js +46 -0
- package/src/assets/pptx/themes/g360.js +32 -0
- package/src/assets/pptx/themes/index.js +2 -0
- package/src/assets/templates/python-flet-polished/README.md +39 -0
- package/src/assets/templates/python-flet-polished/main.py +7 -0
- package/src/assets/templates/python-flet-polished/pyproject.toml +1 -0
- package/src/assets/templates/python-flet-polished/requirements.txt +1 -0
- package/src/assets/templates/python-flet-polished/skill.json +27 -1
- package/src/assets/templates/python-flet-polished/src/app.py +44 -1
- package/src/assets/templates/python-flet-polished/src/config/theme.py +153 -74
- package/src/assets/templates/python-flet-polished/src/core/g360_registry.py +562 -0
- package/src/assets/templates/python-flet-polished/src/ui/dashboard.py +2 -2
- package/src/assets/templates/python-flet-polished/src/ui/kpi_card.py +1 -1
- package/src/assets/templates/python-flet-polished/src/ui/search_overlay.py +4 -4
- package/src/cli.js +11 -0
- package/src/commands/addon.test.js +2 -2
- package/src/commands/pptx.js +89 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comando: g360 pptx [path] [opciones]
|
|
3
|
+
* Genera presentacion/manual PPTX para una app G360.
|
|
4
|
+
*/
|
|
5
|
+
import chalk from 'chalk';
|
|
6
|
+
import fs from 'fs-extra';
|
|
7
|
+
import path from 'path';
|
|
8
|
+
import { fileURLToPath } from 'url';
|
|
9
|
+
import ora from 'ora';
|
|
10
|
+
|
|
11
|
+
import { analyzeApp } from '../assets/pptx/scripts/analyze-app.js';
|
|
12
|
+
import { generateManualPptx } from '../assets/pptx/templates/app-manual.js';
|
|
13
|
+
|
|
14
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
|
|
16
|
+
export async function pptx(targetPath, options) {
|
|
17
|
+
const {
|
|
18
|
+
mode = 'manual',
|
|
19
|
+
theme: themeName = null,
|
|
20
|
+
out,
|
|
21
|
+
dryRun = false,
|
|
22
|
+
screenshots,
|
|
23
|
+
} = options;
|
|
24
|
+
|
|
25
|
+
const targetDir = path.join(process.cwd(), targetPath || '.');
|
|
26
|
+
|
|
27
|
+
if (!await fs.pathExists(targetDir)) {
|
|
28
|
+
console.error(chalk.red(`❌ Directorio no encontrado: ${targetDir}`));
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Detectar branding desde skill.json
|
|
33
|
+
const skillPath = path.join(targetDir, 'skill.json');
|
|
34
|
+
let detectedBrand = 'g360';
|
|
35
|
+
if (await fs.pathExists(skillPath)) {
|
|
36
|
+
try {
|
|
37
|
+
const skill = await fs.readJson(skillPath);
|
|
38
|
+
detectedBrand = skill.brand || 'g360';
|
|
39
|
+
if (detectedBrand === 'cipsa' && !themeName) themeName = 'cipsa';
|
|
40
|
+
} catch {}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
console.log(chalk.bold.cyan('\n📊 G360 App → PPTX Generator\n'));
|
|
44
|
+
console.log(chalk.gray(` Proyecto: ${targetDir}`));
|
|
45
|
+
console.log(chalk.gray(` Modo: ${mode}`));
|
|
46
|
+
console.log(chalk.gray(` Theme: ${themeName || detectedBrand}`));
|
|
47
|
+
if (out) console.log(chalk.gray(` Salida: ${out}`));
|
|
48
|
+
console.log('');
|
|
49
|
+
|
|
50
|
+
if (dryRun) {
|
|
51
|
+
console.log(chalk.yellow('📋 DRY RUN — Outline generado:\n'));
|
|
52
|
+
console.log(chalk.gray(' [1] Portada'));
|
|
53
|
+
console.log(chalk.gray(' [2] Introducción'));
|
|
54
|
+
console.log(chalk.gray(' [3] Instalación'));
|
|
55
|
+
console.log(chalk.gray(' [4] Dashboard / Inicio'));
|
|
56
|
+
console.log(chalk.gray(' [5-N] Funcionalidades (una por módulo UI detectado)'));
|
|
57
|
+
console.log(chalk.gray(' [N+1] Flujos de trabajo (modales)'));
|
|
58
|
+
console.log(chalk.gray(' [N+2] Arquitectura'));
|
|
59
|
+
console.log(chalk.gray(' [N+3] Buenas prácticas'));
|
|
60
|
+
console.log(chalk.gray(' [N+4] Resumen'));
|
|
61
|
+
console.log(chalk.gray(`\nTotal estimado: ~${12 + Math.min(6, 20)} slides A4`));
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const spinner = ora('Analizando aplicación...').start();
|
|
66
|
+
try {
|
|
67
|
+
const appData = await analyzeApp(targetDir);
|
|
68
|
+
spinner.text = `Generando ${mode} (${appData.features.length} módulos detectados)...`;
|
|
69
|
+
|
|
70
|
+
const pptxPath = await generateManualPptx(appData, {
|
|
71
|
+
mode,
|
|
72
|
+
theme: themeName || detectedBrand,
|
|
73
|
+
outPath: out,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
spinner.succeed(chalk.green(`✅ PPTX generado: ${pptxPath}`));
|
|
77
|
+
console.log(chalk.gray(` Tamaño: ${Math.round((await fs.stat(pptxPath)).size / 1024)} KB`));
|
|
78
|
+
console.log(chalk.gray(` Slides: ~12 A4 (modo manual)`));
|
|
79
|
+
console.log('');
|
|
80
|
+
console.log(chalk.cyan(' Siguiente paso:'));
|
|
81
|
+
console.log(chalk.gray(' Revisar el archivo y reemplazar placeholders de screenshots'));
|
|
82
|
+
console.log(chalk.gray(` con imágenes reales de la app en ${path.join(targetDir, 'assets', 'screenshots')}/`));
|
|
83
|
+
console.log('');
|
|
84
|
+
} catch (err) {
|
|
85
|
+
spinner.fail(chalk.red(`❌ Error: ${err.message}`));
|
|
86
|
+
console.error(err.stack);
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
89
|
+
}
|