Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add endpoint for text recognition (OCR) #447

Merged
merged 5 commits into from
Nov 5, 2023

Conversation

DavidMStraub
Copy link
Member

Fixes #445, uses pytesseract.

New endpoint: POST to /media/<handle>/ocr

Query parameters:

  • lang (required) - a tesseract language code (e.g. eng)
  • format: the output format (default is string)

It's POST because the task queue is used when available. Although OCR should be pretty fast, this seems more robust and might allow OCR'ing multi-page PDFs in the future (currently, only images are supported).

@DavidMStraub DavidMStraub merged commit c98d3cf into gramps-project:master Nov 5, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OCR endpoint
1 participant