Add page-marker grouping and party-aware naming
Consecutive captures whose printed PAGE X OF Y markers advance under the same total are grouped into one multi-page PDF, with duplicate pages keeping the better read. Naming gains doc-title/party components and a scan-date fallback so nothing lands in UNSORTED. Vision LLM default switches to minicpm-v (faster, fewer false blanks on dense mono pages).
This commit is contained in:
+5
-6
@@ -90,11 +90,14 @@ def cmd_export(args: argparse.Namespace) -> int:
|
||||
print(f"Running OCR + naming on {len(found)} detected document(s)...")
|
||||
result = run_export(report, cfg, out_dir)
|
||||
|
||||
print(f"\n{'pod':>3} {'date':>10} vendor / final filename")
|
||||
print(f"\n{'pod':>3} {'pages':>5} {'date':>10} vendor / final filename")
|
||||
print("-" * 60)
|
||||
for row in result["rows"]:
|
||||
vendor = row["ocr_vendor"] or "(no vendor found)"
|
||||
print(f"{row['pod_id']:>3} {row['ocr_date'] or '-':>10} {vendor}")
|
||||
print(
|
||||
f"{row['pod_id']:>3} {row['page_count']:>5} "
|
||||
f"{row['ocr_date'] or '-':>10} {vendor}"
|
||||
)
|
||||
print(f" -> {row['pdf_path']} [source: {row['source_of_name']}]")
|
||||
if row.get("llm_description"):
|
||||
issues = f" issues: {row['llm_issues']}" if row.get("llm_issues") else ""
|
||||
@@ -102,10 +105,6 @@ def cmd_export(args: argparse.Namespace) -> int:
|
||||
|
||||
print(f"\nPDFs: {result['pdf_dir']}")
|
||||
print(f"Summary: {out_dir / 'export_summary.csv'}")
|
||||
print(
|
||||
"\nNote: no page-flip/multi-page grouping yet — each detected "
|
||||
"document is a separate single-page PDF."
|
||||
)
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user