Skip to content

Commit 488d50d

Browse files
author
dotfiles-bot
committed
remove unascii
1 parent 6dfffaf commit 488d50d

14 files changed

Lines changed: 205 additions & 143 deletions

File tree

.github/scripts/check-english.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def main():
104104

105105
print("\n" + "="*60)
106106
if total_errors == 0:
107-
print(" No se encontraron cadenas en ingles")
107+
print("[OK] No se encontraron cadenas en ingles")
108108
print("="*60)
109109
return 0
110110
else:

.github/scripts/check-mappings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ def check_mappings():
144144
print("="*60)
145145

146146
if errors > 0:
147-
print(f"X Se detectaron {errors} archivos sin mapping", file=sys.stderr)
147+
print(f"[X] Se detectaron {errors} archivos sin mapping", file=sys.stderr)
148148
return 1
149149
else:
150-
print(" Todos los archivos tienen mapping correcto")
150+
print("[OK] Todos los archivos tienen mapping correcto")
151151
return 0
152152

153153

.github/scripts/test_install.py

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
Este script es un reemplazo completo y mejorado de test-install-mappings.sh
1010
con 100% de paridad funcional:
1111
12-
- Detección de secretos en modules/
13-
- Verificación de todos los mappings del YAML
14-
- Soporte para mappings múltiples y formato key|module
15-
- Detección de archivos sanitizados con verificación CRLF
16-
- Verificación de coherencia de directorios
17-
- Prueba de portabilidad (ejecución desde diferentes directorios)
18-
- Códigos de salida idénticos (0=OK, 1=error, 3=directorios, 4=secretos)
12+
- [OK] Detección de secretos en modules/
13+
- [OK] Verificación de todos los mappings del YAML
14+
- [OK] Soporte para mappings múltiples y formato key|module
15+
- [OK] Detección de archivos sanitizados con verificación CRLF
16+
- [OK] Verificación de coherencia de directorios
17+
- [OK] Prueba de portabilidad (ejecución desde diferentes directorios)
18+
- [OK] Códigos de salida idénticos (0=OK, 1=error, 3=directorios, 4=secretos)
1919
2020
Ventajas sobre el bash:
2121
- Usa yaml.safe_load() para parsing robusto del YAML
@@ -603,13 +603,13 @@ def test_subcommands(repo_root: Path) -> bool:
603603
timeout=30
604604
)
605605
if result.returncode == 0:
606-
print(" inspect-mappings OK")
606+
print(" [OK] inspect-mappings OK")
607607
else:
608-
print(f" inspect-mappings FALLÓ (exit {result.returncode})")
608+
print(f" [X] inspect-mappings FALLÓ (exit {result.returncode})")
609609
print(f" stderr: {result.stderr[:200]}")
610610
errors += 1
611611
except Exception as e:
612-
print(f" inspect-mappings ERROR: {e}")
612+
print(f" [X] inspect-mappings ERROR: {e}")
613613
errors += 1
614614

615615
# Test 2: backup-list (sin backups aún, pero no debe fallar)
@@ -623,12 +623,12 @@ def test_subcommands(repo_root: Path) -> bool:
623623
timeout=10
624624
)
625625
if result.returncode == 0:
626-
print(" backup-list OK")
626+
print(" [OK] backup-list OK")
627627
else:
628-
print(f" backup-list FALLÓ (exit {result.returncode})")
628+
print(f" [X] backup-list FALLÓ (exit {result.returncode})")
629629
errors += 1
630630
except Exception as e:
631-
print(f" backup-list ERROR: {e}")
631+
print(f" [X] backup-list ERROR: {e}")
632632
errors += 1
633633

634634
# Test 3: backup-restore --latest --dry-run (debe fallar gracefully si no hay backups)
@@ -643,12 +643,12 @@ def test_subcommands(repo_root: Path) -> bool:
643643
)
644644
# Puede ser 0 (éxito) o 1 (no hay backups), ambos son válidos
645645
if result.returncode in [0, 1]:
646-
print(" backup-restore OK (comportamiento esperado)")
646+
print(" [OK] backup-restore OK (comportamiento esperado)")
647647
else:
648-
print(f" backup-restore FALLÓ (exit {result.returncode})")
648+
print(f" [X] backup-restore FALLÓ (exit {result.returncode})")
649649
errors += 1
650650
except Exception as e:
651-
print(f" backup-restore ERROR: {e}")
651+
print(f" [X] backup-restore ERROR: {e}")
652652
errors += 1
653653

654654
# Test 4: backup-clean 5 --dry-run
@@ -662,12 +662,12 @@ def test_subcommands(repo_root: Path) -> bool:
662662
timeout=10
663663
)
664664
if result.returncode == 0:
665-
print(" backup-clean OK")
665+
print(" [OK] backup-clean OK")
666666
else:
667-
print(f" backup-clean FALLÓ (exit {result.returncode})")
667+
print(f" [X] backup-clean FALLÓ (exit {result.returncode})")
668668
errors += 1
669669
except Exception as e:
670-
print(f" backup-clean ERROR: {e}")
670+
print(f" [X] backup-clean ERROR: {e}")
671671
errors += 1
672672

673673
# Test 5: update-submodules (solo si hay distros/PKGBUILD/)
@@ -684,13 +684,13 @@ def test_subcommands(repo_root: Path) -> bool:
684684
timeout=60
685685
)
686686
if result.returncode == 0:
687-
print(" update-submodules OK")
687+
print(" [OK] update-submodules OK")
688688
else:
689-
print(f" update-submodules FALLÓ (exit {result.returncode})")
689+
print(f" [X] update-submodules FALLÓ (exit {result.returncode})")
690690
print(f" stderr: {result.stderr[:200]}")
691691
errors += 1
692692
except Exception as e:
693-
print(f" update-submodules ERROR: {e}")
693+
print(f" [X] update-submodules ERROR: {e}")
694694
errors += 1
695695
else:
696696
print(" ⊘ update-submodules SKIP (no hay distros/PKGBUILD/)")
@@ -706,13 +706,13 @@ def test_subcommands(repo_root: Path) -> bool:
706706
timeout=30
707707
)
708708
if result.returncode == 0:
709-
print(" setup-githooks OK")
709+
print(" [OK] setup-githooks OK")
710710
else:
711-
print(f" setup-githooks FALLÓ (exit {result.returncode})")
711+
print(f" [X] setup-githooks FALLÓ (exit {result.returncode})")
712712
print(f" stderr: {result.stderr[:200]}")
713713
errors += 1
714714
except Exception as e:
715-
print(f" setup-githooks ERROR: {e}")
715+
print(f" [X] setup-githooks ERROR: {e}")
716716
errors += 1
717717

718718
# Test 7: setup-githooks --disable
@@ -726,22 +726,22 @@ def test_subcommands(repo_root: Path) -> bool:
726726
timeout=10
727727
)
728728
if result.returncode == 0:
729-
print(" setup-githooks --disable OK")
729+
print(" [OK] setup-githooks --disable OK")
730730
else:
731-
print(f" setup-githooks --disable FALLÓ (exit {result.returncode})")
731+
print(f" [X] setup-githooks --disable FALLÓ (exit {result.returncode})")
732732
errors += 1
733733
except Exception as e:
734-
print(f" setup-githooks --disable ERROR: {e}")
734+
print(f" [X] setup-githooks --disable ERROR: {e}")
735735
errors += 1
736736

737737
# Resumen
738738
print("\n" + "="*60)
739739
if errors == 0:
740-
print(" TODOS LOS SUBCOMANDOS FUNCIONAN CORRECTAMENTE")
740+
print("[OK] TODOS LOS SUBCOMANDOS FUNCIONAN CORRECTAMENTE")
741741
print("="*60)
742742
return True
743743
else:
744-
print(f" {errors} SUBCOMANDO(S) FALLÓ/FALLARON")
744+
print(f"[X] {errors} SUBCOMANDO(S) FALLÓ/FALLARON")
745745
print("="*60)
746746
return False
747747

@@ -874,16 +874,16 @@ def scan_dir(current_dir: Path, depth: int):
874874
if warnings:
875875
print(f"\nWarnings: {len(warnings)}")
876876
for w in warnings:
877-
print(f" {w}")
877+
print(f" [!] {w}")
878878

879879
if errors:
880880
print(f"\nErrores: {len(errors)}")
881881
for e in errors:
882-
print(f" {e}")
882+
print(f" [X] {e}")
883883
print("\n" + "="*60)
884884
return 1
885885
else:
886-
print("\n Todos los symlinks verificados correctamente")
886+
print("\n[OK] Todos los symlinks verificados correctamente")
887887
print("="*60)
888888

889889
# Verificación adicional: probar que funciona desde diferentes directorios
@@ -894,11 +894,11 @@ def scan_dir(current_dir: Path, depth: int):
894894
# Test de subcomandos
895895
if not args.no_subcommands:
896896
if not test_subcommands(repo_root):
897-
print("\n Algunos subcomandos no pasaron las pruebas")
897+
print("\n[X] Algunos subcomandos no pasaron las pruebas")
898898
return 1
899899

900900
print("\n" + "="*60)
901-
print(" TODAS LAS VERIFICACIONES PASARON")
901+
print("[OK] TODAS LAS VERIFICACIONES PASARON")
902902
print("="*60)
903903
return 0
904904

install-mappings.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ default_action: dotify
66
# modules/shell
77
#########################
88

9-
## FixMe: Fix the install mappings for the shell modules that actually use the xdg locations
10-
119
# Shell-specific configs (modules/shell/*)
1210
starship.toml|starship: xdg:starship/starship.toml # modules/shell/starship
1311
config.fish|fish: xdg:fish/config.fish # modules/shell/fish

scripts/dotfiles_installer/attributes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ def fix_attributes(path: Path, recursive: bool = False, verbose: bool = False) -
126126
# Agregar permisos de ejecución: rwxr-xr-x (0o755)
127127
os.chmod(path, 0o755)
128128
if verbose:
129-
print(f" Permisos ejecutables agregados: {path.name}")
129+
print(f" [OK] Permisos ejecutables agregados: {path.name}")
130130
return True
131131
except (OSError, IOError) as e:
132132
if verbose:
133-
print(f" No se pudieron establecer permisos en {path.name}: {e}")
133+
print(f" [!] No se pudieron establecer permisos en {path.name}: {e}")
134134
return False

scripts/dotfiles_installer/backup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,15 @@ def restore_backup(timestamp: str, target_dir: Optional[Path] = None, dry_run: b
180180
else:
181181
original_path.unlink()
182182
shutil.copytree(backup_file, original_path)
183-
print(f" > Restaurado (dir): {original_path.name}")
183+
print(f" [OK] Restaurado (dir): {original_path.name}")
184184
else:
185185
# Copiar backup al original
186186
shutil.copy2(backup_file, original_path)
187-
print(f" > Restaurado: {original_path.name}")
187+
print(f" [OK] Restaurado: {original_path.name}")
188188

189189
restored += 1
190190
except Exception as e:
191-
print(f" X Error restaurando {original_path.name}: {e}")
191+
print(f" [X] Error restaurando {original_path.name}: {e}")
192192
errors += 1
193193

194194
print(f"\nResultado: {restored} restaurados, {errors} errores")
@@ -223,15 +223,15 @@ def clean_old_backups(keep: int = 5, target_dir: Optional[Path] = None, dry_run:
223223
backup_path = get_backup_dir() / timestamp
224224

225225
if dry_run:
226-
print(f" [DRY-RUN] Eliminaría: {timestamp}")
226+
print(f" [DRY-RUN] Eliminaria: {timestamp}")
227227
deleted += 1
228228
else:
229229
try:
230230
shutil.rmtree(backup_path)
231-
print(f" 🗑 Eliminado: {timestamp}")
231+
print(f" [CL] Eliminado: {timestamp}")
232232
deleted += 1
233233
except Exception as e:
234-
print(f" Error eliminando {timestamp}: {e}")
234+
print(f" [X] Error eliminando {timestamp}: {e}")
235235

236236
print(f"\nEliminados: {deleted} backup(s)")
237237
return deleted

scripts/dotfiles_installer/fonts.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ def rebuild_font_cache() -> bool:
108108
True si se reconstruyó exitosamente, False en caso contrario
109109
"""
110110
try:
111-
print(" Reconstruyendo caché de fuentes...")
111+
print(" -> Reconstruyendo caché de fuentes...")
112112
subprocess.check_call(['fc-cache', '-fv'],
113113
stdout=subprocess.DEVNULL,
114114
stderr=subprocess.DEVNULL)
115-
print(" Caché de fuentes reconstruida")
115+
print(" [OK] Caché de fuentes reconstruida")
116116
return True
117117
except (subprocess.CalledProcessError, FileNotFoundError):
118-
print(" No se pudo reconstruir la caché de fuentes")
118+
print(" [!] No se pudo reconstruir la caché de fuentes")
119119
return False
120120

121121

@@ -138,15 +138,15 @@ def check_and_install_fonts(interactive: bool = True,
138138
# Detectar distribución
139139
distro = detect_distro()
140140
if not distro:
141-
print(" No se pudo detectar la distribución Linux")
141+
print("[!] No se pudo detectar la distribución Linux")
142142
print(" Las fuentes deben instalarse manualmente")
143143
return ([], REQUIRED_FONTS)
144144

145145
print(f"Distribución detectada: {distro}")
146146

147147
# Verificar fontconfig
148148
if not which('fc-list'):
149-
print(" fontconfig (fc-list) no está instalado")
149+
print("[!] fontconfig (fc-list) no está instalado")
150150
print(" No se pueden verificar fuentes automáticamente")
151151
return ([], REQUIRED_FONTS)
152152

@@ -164,17 +164,17 @@ def check_and_install_fonts(interactive: bool = True,
164164
status = "requerida" if is_required else "opcional"
165165

166166
if is_font_installed(font):
167-
print(f" {font} ({status}): instalada")
167+
print(f"[OK] {font} ({status}): instalada")
168168
installed.append(font)
169169
else:
170-
print(f" {font} ({status}): NO instalada")
170+
print(f"[X] {font} ({status}): NO instalada")
171171
missing.append(font)
172172

173173
# Intentar instalar si es requerida
174174
if is_required:
175175
package = get_package_for_font(font, distro)
176176
if not package:
177-
print(f" No se conoce el paquete para {font} en {distro}")
177+
print(f" [!] No se conoce el paquete para {font} en {distro}")
178178
continue
179179

180180
# Instalar usando la función compartida
@@ -191,18 +191,18 @@ def check_and_install_fonts(interactive: bool = True,
191191
print("\n" + "="*60)
192192
print("Resumen de Fuentes")
193193
print("="*60)
194-
print(f" Instaladas: {len(installed)}")
194+
print(f"[OK] Instaladas: {len(installed)}")
195195
if newly_installed:
196196
print(f" Recién instaladas: {', '.join(newly_installed)}")
197197

198198
if missing:
199-
print(f"\n Faltantes: {len(missing)}")
199+
print(f"\n[!] Faltantes: {len(missing)}")
200200
for font in missing:
201201
package = get_package_for_font(font, distro)
202202
if package:
203-
print(f" - {font} instalar con: sudo pacman -S {package}")
203+
print(f" - {font} -> instalar con: sudo pacman -S {package}")
204204
else:
205-
print(f" - {font} instalar manualmente")
205+
print(f" - {font} -> instalar manualmente")
206206

207207
return (installed, missing)
208208

scripts/dotfiles_installer/githooks.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def setup_hooks_path(hooks_dir: str = '.githooks') -> bool:
5555
check=True,
5656
capture_output=True
5757
)
58-
print(f" Ruta de hooks de Git configurada a '{hooks_dir}'")
58+
print(f"[OK] Ruta de hooks de Git configurada a '{hooks_dir}'")
5959
print(f" Para revertir: git config --unset core.hooksPath")
6060
return True
6161
except subprocess.CalledProcessError as e:
@@ -128,15 +128,15 @@ def fix_executable_permissions() -> int:
128128
check=True
129129
)
130130
updated += 1
131-
print(f" {file_path}")
131+
print(f" [OK] {file_path}")
132132
except subprocess.CalledProcessError:
133133
# Pueden fallar algunos (ej: archivos ya con +x), no es crítico
134134
errors += 1
135135

136136
if updated > 0:
137-
print(f"\n {updated} archivo(s) con shebang actualizado(s)")
137+
print(f"\n[OK] {updated} archivo(s) con shebang actualizado(s)")
138138
else:
139-
print("\n No se necesitaron actualizaciones")
139+
print("\n[OK] No se necesitaron actualizaciones")
140140

141141
if errors > 0 and errors < len(files):
142142
print(f" (algunos archivos ya tenían permisos correctos)")
@@ -169,7 +169,7 @@ def setup_githooks(hooks_dir: str = '.githooks', fix_permissions: bool = True) -
169169
fix_executable_permissions()
170170

171171
print("\n" + "="*60)
172-
print(" Configuración de Git hooks completada")
172+
print("[OK] Configuración de Git hooks completada")
173173
print("="*60)
174174

175175
return 0
@@ -192,14 +192,14 @@ def disable_githooks() -> int:
192192
check=True,
193193
capture_output=True
194194
)
195-
print(" Hooks personalizados desactivados")
195+
print("[OK] Hooks personalizados desactivados")
196196
print(" Git usará .git/hooks/ (configuración por defecto)")
197197
return 0
198198
except subprocess.CalledProcessError as e:
199199
# Si el config no existe, no es un error
200200
stderr_str = e.stderr.decode('utf-8', errors='ignore').lower()
201201
if 'not found' in stderr_str or 'no such' in stderr_str:
202-
print(" No había hooks personalizados configurados")
202+
print("[OK] No había hooks personalizados configurados")
203203
return 0
204204
print(f"ERROR al desactivar hooks: {e}", file=sys.stderr)
205205
if e.stderr:

0 commit comments

Comments
 (0)