Skip to content

v1.3.0 - Preview-Locked Execution & Vendor OCR Pass

Choose a tag to compare

@nukie-git nukie-git released this 04 Sep 14:17

🌟 Preview-Locked Execution & Vendor OCR Pass (v1.3.0)

Key Features & Improvements

  • Preview-Locked Execution: execute_rename.py now renames from the dry run's saved snapshot (logs/pending_mapping.json) instead of independently re-scanning the folder — closes a gap where the approved preview and the actual rename could silently diverge.
  • Rollback on Partial Rename Failure: A failed second rename step now restores the original filename instead of leaving the file stuck as <name>.pdf.tmp_rename.
  • Vendor OCR Pass: Scanned bons now get a heuristic vendor name read from the header lines instead of a hardcoded vendor, with a warning flag when that read is inconclusive. Lines matching Nama/Alamat Pemesanan are excluded from vendor candidacy.
  • Low-Confidence Warnings Surfaced in Preview Table: OCR-unavailable, no-date-found, and inconclusive-vendor cases are flagged with ⚠️ and explanatory notes instead of silently guessing.
  • Encrypted-PDF Detection: Password-protected PDFs report a clear error in the preview table instead of generic crashes.
  • Date-Fix Scoping: OCR digit/separator corrections apply only to the local text window around candidate date matches.
  • Year Cross-Check: Missing year in matched dates falls back to years found elsewhere in OCR text before falling back to current year.
  • Filename Sanitization: Trailing dot/space stripping, Windows-reserved device names (CON, PRN, NUL...), and safe stem length caps.
  • Batch Runners Fail-Closed: Aborts immediately on dry-run failure instead of falling through to rename confirmation.

Package Asset

  • pdf_rename_workflow.zip attached for standalone deployment.