Add batch processing for pending OCR
This commit is contained in:
31
README.md
31
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:
|
||||
|
||||
Reference in New Issue
Block a user