Skip to content

Conversation

@ianardee
Copy link
Contributor

Allow getting ocr return in CLI

Description

Add the -w option to the CLI for returning the OCR key.

Motivation and Context

Useful for testing

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@ianardee ianardee force-pushed the add-ocr branch 2 times, most recently from ae1d37e to 6d7469b Compare February 17, 2022 12:41
Copy link
Contributor

@fharper fharper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the -h or usage error message doesn't include this new option

@fharper
Copy link
Contributor

fharper commented Feb 17, 2022

Maybe I don't use it correctly, but it doesn't return me anything new when using the new option.

@ianardee
Copy link
Contributor Author

@fharper it's not a general option, only available for OTS endpoints.

For example this will show it: ./mindee-cli.sh invoice -h


It only has an effect when using the raw output option, i.e.

./mindee-cli.sh invoice -o raw /path/to/invoice.pdf > invoice.json
./mindee-cli.sh invoice -w -o raw /path/to/invoice.pdf > invoice_ocr.json

diff -yZ invoice.json  invoice_ocr.json

It's useful for debugging the OCR output, but that's about it for now.

@ianardee ianardee force-pushed the add-ocr branch 2 times, most recently from c1f8bca to 06765ce Compare February 18, 2022 12:36
Copy link
Contributor

@fharper fharper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ianardee ianardee merged commit 059f087 into main Feb 18, 2022
@ianardee ianardee deleted the add-ocr branch February 18, 2022 15:13
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.

3 participants