mirror of
https://github.com/KeymonSoft/DBCheck.git
synced 2026-04-17 19:37:09 +00:00
Version 5.11.25
This commit is contained in:
43
B4A/_juntaBas.ps1
Normal file
43
B4A/_juntaBas.ps1
Normal file
@@ -0,0 +1,43 @@
|
||||
# SCRIPT: _juntaBas.ps1 - Versión con Manifiesto para LLM
|
||||
$OutputFile="_CODIGO_COMPLETO_PARA_LLM.txt"
|
||||
|
||||
# Eliminar el archivo anterior si existe
|
||||
Remove-Item -Path $OutputFile -ErrorAction SilentlyContinue
|
||||
|
||||
Write-Host "Iniciando fusion para LLM..."
|
||||
|
||||
# 1. Obtener la lista de archivos primero para el Manifiesto
|
||||
$files = Get-ChildItem -Path ".\*" -Include @("*.bas", "*.b4a", "*.j")
|
||||
|
||||
# --- GENERACIÓN DEL MANIFIESTO (TABLA DE CONTENIDO) ---
|
||||
Add-Content -Path $OutputFile -Value "'======================================================================================" -Encoding UTF8
|
||||
Add-Content -Path $OutputFile -Value "' MANIFIESTO DEL PROYECTO - Generado el $(Get-Date -Format 'yyyy-MM-dd HH:mm')" -Encoding UTF8
|
||||
Add-Content -Path $OutputFile -Value "' Total de archivos: $($files.Count)" -Encoding UTF8
|
||||
Add-Content -Path $OutputFile -Value "'======================================================================================" -Encoding UTF8
|
||||
|
||||
foreach ($file in $files) {
|
||||
$lines = (Get-Content $file.FullName).Count
|
||||
Add-Content -Path $OutputFile -Value "' [ ] Archivo: $($file.Name) ($lines líneas)" -Encoding UTF8
|
||||
}
|
||||
Add-Content -Path $OutputFile -Value "'======================================================================================`n" -Encoding UTF8
|
||||
|
||||
# 2. Itera y vuelca el contenido de los archivos
|
||||
$files | ForEach-Object {
|
||||
$currentFile = $_.Name
|
||||
Write-Host "Procesando: $currentFile"
|
||||
|
||||
# Encabezado de sección
|
||||
Add-Content -Path $OutputFile -Value "'======================================================================================" -Encoding UTF8
|
||||
Add-Content -Path $OutputFile -Value "// ARCHIVO_INICIO: ${currentFile}" -Encoding UTF8
|
||||
Add-Content -Path $OutputFile -Value "'======================================================================================`n" -Encoding UTF8
|
||||
|
||||
# Contenido con codificación UTF8
|
||||
Get-Content -Encoding UTF8 -Path $_.FullName -Raw | Add-Content -Path $OutputFile -Encoding UTF8
|
||||
|
||||
# Delimitador de fin
|
||||
Add-Content -Path $OutputFile -Value "`n'======================================================================================" -Encoding UTF8
|
||||
Add-Content -Path $OutputFile -Value "// ARCHIVO_FIN: ${currentFile}" -Encoding UTF8
|
||||
Add-Content -Path $OutputFile -Value "'======================================================================================`n" -Encoding UTF8
|
||||
}
|
||||
|
||||
Write-Host "¡Listo! Archivo $OutputFile generado con éxito."
|
||||
Reference in New Issue
Block a user