EvaluationWorkspace
This commit is contained in:
+4
-4
@@ -6,6 +6,8 @@ import shutil
|
||||
from pathlib import Path
|
||||
from pypdf import PdfWriter
|
||||
|
||||
from copienator import atomic_write_json
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
sys.exit("Usage: python resolve_manual.py <InputDir>")
|
||||
|
||||
@@ -180,12 +182,10 @@ for temp in temp_files:
|
||||
temp.unlink()
|
||||
|
||||
# Finalize JSONs
|
||||
with open(correction_file, "w", encoding="utf-8") as f:
|
||||
json.dump(results, f, indent=2)
|
||||
atomic_write_json(correction_file, results)
|
||||
|
||||
if refaire_tasks:
|
||||
with open(refaire_file, "w", encoding="utf-8") as f:
|
||||
json.dump(refaire_tasks, f, indent=2)
|
||||
atomic_write_json(refaire_file, refaire_tasks)
|
||||
|
||||
manual_file.unlink(missing_ok=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user