Fix encoding issues, add verification/repair scripts, fix check_progress encoding

This commit is contained in:
n3wk
2026-08-24 20:54:33 +02:00
parent ab1fc2958b
commit 03d1e6f740
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -79,9 +79,9 @@ def check_progress():
if has_a: stats["analysis"] += 1
if has_v: stats["verified"] += 1
t_status = "✓" if has_t else " "
a_status = "✓" if has_a else " "
v_status = "✓" if has_v else " "
t_status = "[OK]" if has_t else "[..]"
a_status = "[OK]" if has_a else "[..]"
v_status = "[OK]" if has_v else "[..]"
# Try to get title
title = ""
+4 -4
View File
@@ -22,18 +22,18 @@ def verify_utf8(path: Path) -> tuple[int, int]:
return (0, len(content))
def main():
def main(path: str = '.') -> int:
import argparse
parser = argparse.ArgumentParser(description="Verify UTF-8 encoding in JSON files")
parser.add_argument('path', nargs='?', default='.', help='Root directory to scan')
args = parser.parse_args()
root = Path('.').resolve()
root = Path(args.path).resolve()
print(f"Scanning {root} for JSON files...")
stats = {"files": 0, "errors": 0, "bytes": 0}
stats = {"files_checked": 0, "errors": 0, "total_bytes": 0}
for path in Path('.').rglob("*.json"):
for path in root.rglob("*.json"):
if any(part.startswith('.') for part in path.parts):
continue
if path.name.startswith('.'):