From 86c672de1ec3924a1c69b92d724789c08480769f Mon Sep 17 00:00:00 2001 From: Urban Date: Fri, 17 Jul 2026 22:17:19 +0200 Subject: [PATCH] Add batch processing for pending OCR --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 9e9a89a..a2b20c9 100644 --- a/README.md +++ b/README.md @@ -528,6 +528,37 @@ Do not recreate the database this way after it contains manually maintained meta OCR data must also be recreated if the database is deleted. +## OCR batch processing + +Process all movies waiting for OCR: + +```bash +scripts/process_pending_ocr.py +``` +Limit the number of records: +```bash +scripts/process_pending_ocr.py --limit 5 +``` +Use a test database: +```bash +scripts/process_pending_ocr.py \ + --database database/wcx-test.db \ + --limit 1 +``` +The script selects movies with ocr_status = 'pending' and invokes +check_ocr.py once per movie. Processing continues if an individual movie +fails. + +Possible results are: + +completed +manual_review +failed + +A summary is printed after the batch has finished. + +GOOGLE_VISION_API_KEY must be available in the environment. + ## Legacy CSV migration The historical index is stored in: