fix: replace all non-ASCII progress markers for Windows encoding

Also fix miner.py checkmark and box-drawing/arrow chars (─, →) in
both miner.py and split_mega_files.py that would crash on cp1251/cp1252.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jp
2026-04-12 00:25:14 -07:00
parent 542b53bb0f
commit 15ea385554
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -602,7 +602,7 @@ def process_file(
chunks = chunk_text(content, source_file) chunks = chunk_text(content, source_file)
if dry_run: if dry_run:
print(f" [DRY RUN] {filepath.name} room:{room} ({len(chunks)} drawers)") print(f" [DRY RUN] {filepath.name} -> room:{room} ({len(chunks)} drawers)")
return len(chunks), room return len(chunks), room
# Lock this file so concurrent agents don't interleave delete+insert. # Lock this file so concurrent agents don't interleave delete+insert.
@@ -779,7 +779,7 @@ def mine(
print(" .gitignore: DISABLED") print(" .gitignore: DISABLED")
if include_ignored: if include_ignored:
print(f" Include: {', '.join(sorted(normalize_include_paths(include_ignored)))}") print(f" Include: {', '.join(sorted(normalize_include_paths(include_ignored)))}")
print(f"{'' * 55}\n") print(f"{'-' * 55}\n")
if not dry_run: if not dry_run:
collection = get_collection(palace_path) collection = get_collection(palace_path)
@@ -809,7 +809,7 @@ def mine(
total_drawers += drawers total_drawers += drawers
room_counts[room] += 1 room_counts[room] += 1
if not dry_run: if not dry_run:
print(f" [{i:4}/{len(files)}] {filepath.name[:50]:50} +{drawers}") print(f" + [{i:4}/{len(files)}] {filepath.name[:50]:50} +{drawers}")
print(f"\n{'=' * 55}") print(f"\n{'=' * 55}")
print(" Done.") print(" Done.")
+3 -3
View File
@@ -290,7 +290,7 @@ def main():
print(f" Source: {src_dir}") print(f" Source: {src_dir}")
print(f" Output: {output_dir or 'same dir as source'}") print(f" Output: {output_dir or 'same dir as source'}")
print(f" Mega-files: {len(mega_files)}") print(f" Mega-files: {len(mega_files)}")
print(f"{'' * 60}\n") print(f"{'-' * 60}\n")
total_written = 0 total_written = 0
for f, n_sessions in mega_files: for f, n_sessions in mega_files:
@@ -301,11 +301,11 @@ def main():
if not args.dry_run and written: if not args.dry_run and written:
backup = f.with_suffix(".mega_backup") backup = f.with_suffix(".mega_backup")
f.rename(backup) f.rename(backup)
print(f" Original renamed to {backup.name}\n") print(f" -> Original renamed to {backup.name}\n")
else: else:
print() print()
print(f"{'' * 60}") print(f"{'-' * 60}")
if args.dry_run: if args.dry_run:
print(f" DRY RUN — would create {total_written} files from {len(mega_files)} mega-files") print(f" DRY RUN — would create {total_written} files from {len(mega_files)} mega-files")
else: else: