mirror of
https://github.com/KeymonSoft/Guna_Preventa.git
synced 2026-04-17 12:56:17 +00:00
28 lines
1.5 KiB
PowerShell
28 lines
1.5 KiB
PowerShell
# SCRIPT: _juntaBas.ps1 - Versión Saneada y Optimizada para LLM
|
|
$OutputFile="_CODIGO_COMPLETO_PARA_LLM.txt"
|
|
|
|
# Eliminar el archivo anterior si existe (IMPORTANTE)
|
|
Remove-Item -Path $OutputFile -ErrorAction SilentlyContinue
|
|
|
|
Write-Host "Iniciando fusion para LLM..."
|
|
|
|
# Itera sobre los archivos .bas, .b4a, .b4j
|
|
Get-ChildItem -Path ".\*" -Include @("*.bas", "*.b4a", "*.b4j") | ForEach-Object {
|
|
$currentFile = $_.Name
|
|
Write-Host "Procesando: $currentFile"
|
|
|
|
# --- ENCABEZADO ESTRUCTURADO Y COMENTADO EN B4X (Agregado al archivo) ---
|
|
Add-Content -Path $OutputFile -Value "`n'======================================================================================"
|
|
Add-Content -Path $OutputFile -Value $"// ARCHIVO_INICIO: ${currentFile}"
|
|
Add-Content -Path $OutputFile -Value "'======================================================================================`n"
|
|
|
|
# Vuelca el contenido del archivo
|
|
Get-Content -Encoding UTF8 -Path $_.FullName -Raw | Add-Content -Path $OutputFile
|
|
|
|
# --- DELIMITADOR DE FIN DE ARCHIVO (Agregado al archivo) ---
|
|
Add-Content -Path $OutputFile -Value "`n'======================================================================================"
|
|
Add-Content -Path $OutputFile -Value $"// ARCHIVO_FIN: ${currentFile}"
|
|
Add-Content -Path $OutputFile -Value "'======================================================================================`n"
|
|
}
|
|
|
|
Write-Host "`nProceso terminado. Se ha creado el archivo: $OutputFile" |