Agregada opcion de valores por defecto en level2
This commit is contained in:
parent
b38c26bee7
commit
6ffdec7a9a
|
@ -0,0 +1,174 @@
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
share/python-wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.nox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
*.py,cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
cover/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
db.sqlite3-journal
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
.pybuilder/
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
# For a library or package, you might want to ignore these files since the code is
|
||||||
|
# intended to run in multiple environments; otherwise, check them in:
|
||||||
|
# .python-version
|
||||||
|
|
||||||
|
# pipenv
|
||||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||||
|
# install all needed dependencies.
|
||||||
|
#Pipfile.lock
|
||||||
|
|
||||||
|
# UV
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
|
# commonly ignored for libraries.
|
||||||
|
#uv.lock
|
||||||
|
|
||||||
|
# poetry
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
|
# commonly ignored for libraries.
|
||||||
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||||
|
#poetry.lock
|
||||||
|
|
||||||
|
# pdm
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||||
|
#pdm.lock
|
||||||
|
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||||
|
# in version control.
|
||||||
|
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
||||||
|
.pdm.toml
|
||||||
|
.pdm-python
|
||||||
|
.pdm-build/
|
||||||
|
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||||
|
__pypackages__/
|
||||||
|
|
||||||
|
# Celery stuff
|
||||||
|
celerybeat-schedule
|
||||||
|
celerybeat.pid
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
.dmypy.json
|
||||||
|
dmypy.json
|
||||||
|
|
||||||
|
# Pyre type checker
|
||||||
|
.pyre/
|
||||||
|
|
||||||
|
# pytype static type analyzer
|
||||||
|
.pytype/
|
||||||
|
|
||||||
|
# Cython debug symbols
|
||||||
|
cython_debug/
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||||
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
|
#.idea/
|
||||||
|
|
||||||
|
# Ruff stuff:
|
||||||
|
.ruff_cache/
|
||||||
|
|
||||||
|
# PyPI configuration file
|
||||||
|
.pypirc
|
Binary file not shown.
|
@ -0,0 +1,34 @@
|
||||||
|
--- Log de Ejecución: x1.py ---
|
||||||
|
Grupo: EmailCrono
|
||||||
|
Directorio de Trabajo: C:\Trabajo\SIDEL\EMAILs\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS
|
||||||
|
Inicio: 2025-05-03 17:15:12
|
||||||
|
Fin: 2025-05-03 17:15:14
|
||||||
|
Duración: 0:00:01.628641
|
||||||
|
Estado: SUCCESS (Código de Salida: 0)
|
||||||
|
|
||||||
|
--- SALIDA ESTÁNDAR (STDOUT) ---
|
||||||
|
Working directory: C:\Trabajo\SIDEL\EMAILs\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS
|
||||||
|
Input directory: C:\Trabajo\SIDEL\EMAILs\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS
|
||||||
|
Output directory: C:/Users/migue/OneDrive/Miguel/Obsidean/Trabajo/VM/04-SIDEL/00 - MASTER/EMAILs
|
||||||
|
Cronologia file: C:/Users/migue/OneDrive/Miguel/Obsidean/Trabajo/VM/04-SIDEL/00 - MASTER/EMAILs\cronologia.md
|
||||||
|
Attachments directory: C:\Trabajo\SIDEL\EMAILs\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS\adjuntos
|
||||||
|
Beautify rules file: D:\Proyectos\Scripts\ParamManagerScripts\backend\script_groups\EmailCrono\config\beautify_rules.json
|
||||||
|
Found 1 .eml files
|
||||||
|
Loaded 0 existing messages
|
||||||
|
|
||||||
|
Processing C:\Trabajo\SIDEL\EMAILs\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS.eml
|
||||||
|
Aplicando reglas de prioridad 1
|
||||||
|
Aplicando reglas de prioridad 2
|
||||||
|
Aplicando reglas de prioridad 3
|
||||||
|
Aplicando reglas de prioridad 4
|
||||||
|
|
||||||
|
Estadísticas de procesamiento:
|
||||||
|
- Total mensajes encontrados: 1
|
||||||
|
- Mensajes únicos añadidos: 1
|
||||||
|
- Mensajes duplicados ignorados: 0
|
||||||
|
|
||||||
|
Writing 1 messages to C:/Users/migue/OneDrive/Miguel/Obsidean/Trabajo/VM/04-SIDEL/00 - MASTER/EMAILs\cronologia.md
|
||||||
|
|
||||||
|
--- ERRORES (STDERR) ---
|
||||||
|
Ninguno
|
||||||
|
--- FIN DEL LOG ---
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"level1": {
|
||||||
|
"api_key": "your-api-key-here",
|
||||||
|
"model": "gpt-3.5-turbo"
|
||||||
|
},
|
||||||
|
"level2": {
|
||||||
|
"attachments_dir": "adjuntos",
|
||||||
|
"cronologia_file": "cronologia.md"
|
||||||
|
},
|
||||||
|
"level3": {
|
||||||
|
"output_directory": "C:/Users/migue/OneDrive/Miguel/Obsidean/Trabajo/VM/04-SIDEL/00 - MASTER/EMAILs"
|
||||||
|
},
|
||||||
|
"working_directory": "C:\\Trabajo\\SIDEL\\EMAILs\\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS"
|
||||||
|
}
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"path": "C:\\Trabajo\\VM\\40 - 93040 - HENKEL - NEXT2 Problem\\Reporte\\EmailTody",
|
"path": "C:\\Trabajo\\SIDEL\\EMAILs\\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS",
|
||||||
"history": [
|
"history": [
|
||||||
|
"C:\\Trabajo\\SIDEL\\EMAILs\\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS",
|
||||||
|
"C:\\Estudio",
|
||||||
"C:\\Trabajo\\VM\\40 - 93040 - HENKEL - NEXT2 Problem\\Reporte\\EmailTody",
|
"C:\\Trabajo\\VM\\40 - 93040 - HENKEL - NEXT2 Problem\\Reporte\\EmailTody",
|
||||||
"C:\\Trabajo\\VM\\30 - 9.3941- Kosme - Portogallo (Modifica + Linea)\\Reporte\\Emails",
|
"C:\\Trabajo\\VM\\30 - 9.3941- Kosme - Portogallo (Modifica + Linea)\\Reporte\\Emails",
|
||||||
"C:\\Users\\migue\\OneDrive\\Miguel\\Obsidean\\Trabajo\\VM\\30 - 9.3941- Kosme - Portogallo (Modifica + Linea)\\Emails",
|
"C:\\Users\\migue\\OneDrive\\Miguel\\Obsidean\\Trabajo\\VM\\30 - 9.3941- Kosme - Portogallo (Modifica + Linea)\\Emails",
|
||||||
|
|
Binary file not shown.
|
@ -1,4 +1,11 @@
|
||||||
{
|
{
|
||||||
"scl_output_dir": "scl_output",
|
"scl_output_dir": "scl_output",
|
||||||
"xref_output_dir": "xref_output"
|
"xref_output_dir": "xref_output",
|
||||||
|
"xref_source_subdir": "source",
|
||||||
|
"call_xref_filename": "xref_calls_tree.md",
|
||||||
|
"db_usage_xref_filename": "xref_db_usage_summary.md",
|
||||||
|
"plc_tag_xref_filename": "xref_plc_tags_summary.md",
|
||||||
|
"max_call_depth": 5,
|
||||||
|
"max_users_list": 20,
|
||||||
|
"aggregated_filename": "full_project_representation.md"
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -3,7 +3,17 @@
|
||||||
"api_key": "your-api-key-here",
|
"api_key": "your-api-key-here",
|
||||||
"model": "gpt-3.5-turbo"
|
"model": "gpt-3.5-turbo"
|
||||||
},
|
},
|
||||||
"level2": {},
|
"level2": {
|
||||||
|
"scl_output_dir": "scl_output",
|
||||||
|
"xref_output_dir": "xref_output",
|
||||||
|
"xref_source_subdir": "source",
|
||||||
|
"call_xref_filename": "xref_calls_tree.md",
|
||||||
|
"db_usage_xref_filename": "xref_db_usage_summary.md",
|
||||||
|
"plc_tag_xref_filename": "xref_plc_tags_summary.md",
|
||||||
|
"max_call_depth": 5,
|
||||||
|
"max_users_list": 20,
|
||||||
|
"aggregated_filename": "full_project_representation.md"
|
||||||
|
},
|
||||||
"level3": {},
|
"level3": {},
|
||||||
"working_directory": "C:\\Trabajo\\SIDEL\\06 - E5.007363 - Modifica O&U - SAE196 (cip integrato)\\Reporte\\IOExport"
|
"working_directory": "C:\\Trabajo\\SIDEL\\06 - E5.007363 - Modifica O&U - SAE196 (cip integrato)\\Reporte\\IOExport"
|
||||||
}
|
}
|
|
@ -2,4 +2,4 @@
|
||||||
"input_dir": "D:/Datos/Entrada",
|
"input_dir": "D:/Datos/Entrada",
|
||||||
"output_dir": "D:/Datos/Salida",
|
"output_dir": "D:/Datos/Salida",
|
||||||
"batch_size": 50
|
"batch_size": 50
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
21
data/log.txt
21
data/log.txt
|
@ -0,0 +1,21 @@
|
||||||
|
[17:15:12] Iniciando ejecución de x1.py en C:\Trabajo\SIDEL\EMAILs\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS...
|
||||||
|
[17:15:14] Working directory: C:\Trabajo\SIDEL\EMAILs\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS
|
||||||
|
[17:15:14] Input directory: C:\Trabajo\SIDEL\EMAILs\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS
|
||||||
|
[17:15:14] Output directory: C:/Users/migue/OneDrive/Miguel/Obsidean/Trabajo/VM/04-SIDEL/00 - MASTER/EMAILs
|
||||||
|
[17:15:14] Cronologia file: C:/Users/migue/OneDrive/Miguel/Obsidean/Trabajo/VM/04-SIDEL/00 - MASTER/EMAILs\cronologia.md
|
||||||
|
[17:15:14] Attachments directory: C:\Trabajo\SIDEL\EMAILs\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS\adjuntos
|
||||||
|
[17:15:14] Beautify rules file: D:\Proyectos\Scripts\ParamManagerScripts\backend\script_groups\EmailCrono\config\beautify_rules.json
|
||||||
|
[17:15:14] Found 1 .eml files
|
||||||
|
[17:15:14] Loaded 0 existing messages
|
||||||
|
[17:15:14] Processing C:\Trabajo\SIDEL\EMAILs\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS\I_ E5.007727 _ Evo On - SFSRFH300172 + SFSRFH300109 - ANDIA LACTEOS.eml
|
||||||
|
[17:15:14] Aplicando reglas de prioridad 1
|
||||||
|
[17:15:14] Aplicando reglas de prioridad 2
|
||||||
|
[17:15:14] Aplicando reglas de prioridad 3
|
||||||
|
[17:15:14] Aplicando reglas de prioridad 4
|
||||||
|
[17:15:14] Estadísticas de procesamiento:
|
||||||
|
[17:15:14] - Total mensajes encontrados: 1
|
||||||
|
[17:15:14] - Mensajes únicos añadidos: 1
|
||||||
|
[17:15:14] - Mensajes duplicados ignorados: 0
|
||||||
|
[17:15:14] Writing 1 messages to C:/Users/migue/OneDrive/Miguel/Obsidean/Trabajo/VM/04-SIDEL/00 - MASTER/EMAILs\cronologia.md
|
||||||
|
[17:15:14] Ejecución de x1.py finalizada (success). Duración: 0:00:01.628641.
|
||||||
|
[17:15:14] Log completo guardado en: D:\Proyectos\Scripts\ParamManagerScripts\backend\script_groups\EmailCrono\log_x1.txt
|
|
@ -418,6 +418,12 @@ function createFieldEditor(key, field) {
|
||||||
class="w-full p-2 border rounded"
|
class="w-full p-2 border rounded"
|
||||||
onchange="updateVisualSchema()">
|
onchange="updateVisualSchema()">
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label class="block text-sm font-bold mb-2">Valor por Defecto</label>
|
||||||
|
<input type="text" value="${field.default !== undefined ? field.default : ''}"
|
||||||
|
class="w-full p-2 border rounded"
|
||||||
|
onchange="updateVisualSchema()">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
${field.enum ? `
|
${field.enum ? `
|
||||||
<div class="enum-container mt-4">
|
<div class="enum-container mt-4">
|
||||||
|
@ -494,28 +500,55 @@ function updateVisualSchema() {
|
||||||
const inputs = field.getElementsByTagName('input');
|
const inputs = field.getElementsByTagName('input');
|
||||||
const select = field.getElementsByTagName('select')[0];
|
const select = field.getElementsByTagName('select')[0];
|
||||||
const key = inputs[0].value;
|
const key = inputs[0].value;
|
||||||
|
const fieldType = select.value; // string, directory, number, boolean, enum
|
||||||
|
const title = inputs[1].value;
|
||||||
|
const description = inputs[2].value;
|
||||||
|
const defaultValueInput = inputs[3]; // El nuevo input de valor por defecto
|
||||||
|
const defaultValueString = defaultValueInput.value;
|
||||||
|
|
||||||
|
let propertyDefinition = {
|
||||||
|
type: fieldType === 'directory' || fieldType === 'enum' ? 'string' : fieldType, // El tipo base
|
||||||
|
title: title,
|
||||||
|
description: description
|
||||||
|
};
|
||||||
|
|
||||||
|
// Añadir formato específico si es directorio
|
||||||
if (select.value === 'directory') {
|
if (select.value === 'directory') {
|
||||||
schema.properties[key] = {
|
propertyDefinition.format = 'directory';
|
||||||
type: 'string',
|
|
||||||
format: 'directory',
|
|
||||||
title: inputs[1].value,
|
|
||||||
description: inputs[2].value
|
|
||||||
};
|
|
||||||
} else if (select.value === 'enum') {
|
|
||||||
schema.properties[key] = {
|
|
||||||
type: 'string',
|
|
||||||
title: inputs[1].value,
|
|
||||||
description: inputs[2].value,
|
|
||||||
enum: field.querySelector('textarea').value.split('\n').filter(v => v.trim())
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
schema.properties[key] = {
|
|
||||||
type: select.value,
|
|
||||||
title: inputs[1].value,
|
|
||||||
description: inputs[2].value
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Añadir enum si es de tipo enum
|
||||||
|
if (select.value === 'enum') {
|
||||||
|
propertyDefinition.enum = field.querySelector('textarea').value.split('\n').filter(v => v.trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Procesar y añadir el valor por defecto si se proporcionó
|
||||||
|
if (defaultValueString !== null && defaultValueString.trim() !== '') {
|
||||||
|
let typedDefaultValue = defaultValueString;
|
||||||
|
try {
|
||||||
|
if (propertyDefinition.type === 'number' || propertyDefinition.type === 'integer') {
|
||||||
|
typedDefaultValue = Number(defaultValueString);
|
||||||
|
if (isNaN(typedDefaultValue)) {
|
||||||
|
console.warn(`Valor por defecto inválido para número en campo '${key}': ${defaultValueString}. Se omitirá.`);
|
||||||
|
// No añadir default si no es un número válido
|
||||||
|
} else {
|
||||||
|
// Opcional: truncar si el tipo es integer
|
||||||
|
if (propertyDefinition.type === 'integer' && !Number.isInteger(typedDefaultValue)) {
|
||||||
|
typedDefaultValue = Math.trunc(typedDefaultValue);
|
||||||
|
}
|
||||||
|
propertyDefinition.default = typedDefaultValue;
|
||||||
|
}
|
||||||
|
} else if (propertyDefinition.type === 'boolean') {
|
||||||
|
typedDefaultValue = ['true', '1', 'yes', 'on'].includes(defaultValueString.toLowerCase());
|
||||||
|
propertyDefinition.default = typedDefaultValue;
|
||||||
|
} else { // string, enum, directory
|
||||||
|
propertyDefinition.default = typedDefaultValue; // Ya es string
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(`Error procesando valor por defecto para campo '${key}':`, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
schema.properties[key] = propertyDefinition;
|
||||||
});
|
});
|
||||||
|
|
||||||
const jsonEditor = document.getElementById('json-editor');
|
const jsonEditor = document.getElementById('json-editor');
|
||||||
|
|
Loading…
Reference in New Issue