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

Dispatch OCP Event with OcrProcessorResult #144

Closed
g-schmitz opened this issue Aug 24, 2022 · 1 comment · Fixed by #145
Closed

Dispatch OCP Event with OcrProcessorResult #144

g-schmitz opened this issue Aug 24, 2022 · 1 comment · Fixed by #145
Labels
enhancement New feature or request

Comments

@g-schmitz
Copy link
Collaborator

Hey,

it would be nice to have workflow_ocr dispatch an OCP Event.

I'm currently developing my own app for nextcloud and it would be very helpful plus more efficient to be able to hook in and directly get the processed OCR text for each file instead of parsing the finished PDF afterwards.

If desired can help with implementation and submit a PR.

@R0Wi
Copy link
Contributor

R0Wi commented Aug 24, 2022

Thank's for your feedback. In general this should be no big deal. To provide the OCR text content i think we have to introduce the --sidecar option of ocrMyPdf (see also #130 (comment)).

If you'd like to help please feel free to make a PR 👍

@R0Wi R0Wi added the enhancement New feature or request label Aug 24, 2022
R0Wi added a commit to g-schmitz/workflow_ocr that referenced this issue Sep 3, 2022
* Add additional tests
* Refactor code to use more "high-level" SidecarFileAccessor

Signed-off-by: Robin Windey <[email protected]>
R0Wi added a commit to g-schmitz/workflow_ocr that referenced this issue Sep 3, 2022
* Add section for events to README.md
* Remove TOC workflow

Signed-off-by: Robin Windey <[email protected]>
R0Wi added a commit to g-schmitz/workflow_ocr that referenced this issue Sep 19, 2022
@R0Wi R0Wi closed this as completed in #145 Sep 24, 2022
R0Wi added a commit that referenced this issue Sep 24, 2022
* Register EventService class

* Fire TextRecognizedEvent

* Add TextRecognizedEvent class

* Create sidecar and add recognized text to result

* Added PdfOcrProcessor constructor argument

* Added recognizedText variable to class

* Added EventService

* Refactored TextRecognizeEvent

* Added EventService

* Fixed tests

* composer run cs:fix

* Basic code cleanup

Signed-off-by: Robin Windey <[email protected]>

* Adjustments for #144

* Add additional tests
* Refactor code to use more "high-level" SidecarFileAccessor

Signed-off-by: Robin Windey <[email protected]>

* Add docs for #144

* Add section for events to README.md
* Remove TOC workflow

Signed-off-by: Robin Windey <[email protected]>

* Fix php7.4 syntax

Signed-off-by: Robin Windey <[email protected]>

* Add check if event is emitted

Signed-off-by: Robin Windey <[email protected]>

* Change TextRecognizedEvent interface to be more generic

Linked to #144

* Adjust docs to match new interface

Signed-off-by: Robin Windey <[email protected]>

* Fix codecov

Signed-off-by: Robin Windey <[email protected]>

Signed-off-by: Robin Windey <[email protected]>
Co-authored-by: Guido Schmitz <[email protected]>
Co-authored-by: Robin Windey <[email protected]>
R0Wi added a commit that referenced this issue Sep 24, 2022
* Register EventService class

* Fire TextRecognizedEvent

* Add TextRecognizedEvent class

* Create sidecar and add recognized text to result

* Added PdfOcrProcessor constructor argument

* Added recognizedText variable to class

* Added EventService

* Refactored TextRecognizeEvent

* Added EventService

* Fixed tests

* composer run cs:fix

* Basic code cleanup

Signed-off-by: Robin Windey <[email protected]>

* Adjustments for #144

* Add additional tests
* Refactor code to use more "high-level" SidecarFileAccessor

Signed-off-by: Robin Windey <[email protected]>

* Add docs for #144

* Add section for events to README.md
* Remove TOC workflow

Signed-off-by: Robin Windey <[email protected]>

* Fix php7.4 syntax

Signed-off-by: Robin Windey <[email protected]>

* Add check if event is emitted

Signed-off-by: Robin Windey <[email protected]>

* Change TextRecognizedEvent interface to be more generic

Linked to #144

* Adjust docs to match new interface

Signed-off-by: Robin Windey <[email protected]>

* Fix codecov

Signed-off-by: Robin Windey <[email protected]>

Signed-off-by: Robin Windey <[email protected]>
Co-authored-by: Guido Schmitz <[email protected]>
Co-authored-by: Robin Windey <[email protected]>
R0Wi added a commit that referenced this issue Sep 24, 2022
* Register EventService class

* Fire TextRecognizedEvent

* Add TextRecognizedEvent class

* Create sidecar and add recognized text to result

* Added PdfOcrProcessor constructor argument

* Added recognizedText variable to class

* Added EventService

* Refactored TextRecognizeEvent

* Added EventService

* Fixed tests

* composer run cs:fix

* Basic code cleanup

Signed-off-by: Robin Windey <[email protected]>

* Adjustments for #144

* Add additional tests
* Refactor code to use more "high-level" SidecarFileAccessor

Signed-off-by: Robin Windey <[email protected]>

* Add docs for #144

* Add section for events to README.md
* Remove TOC workflow

Signed-off-by: Robin Windey <[email protected]>

* Fix php7.4 syntax

Signed-off-by: Robin Windey <[email protected]>

* Add check if event is emitted

Signed-off-by: Robin Windey <[email protected]>

* Change TextRecognizedEvent interface to be more generic

Linked to #144

* Adjust docs to match new interface

Signed-off-by: Robin Windey <[email protected]>

* Fix codecov

Signed-off-by: Robin Windey <[email protected]>

Signed-off-by: Robin Windey <[email protected]>
Co-authored-by: Guido Schmitz <[email protected]>
Co-authored-by: Robin Windey <[email protected]>
Signed-off-by: Robin Windey <[email protected]>
R0Wi added a commit that referenced this issue Sep 24, 2022
* Register EventService class

* Fire TextRecognizedEvent

* Add TextRecognizedEvent class

* Create sidecar and add recognized text to result

* Added PdfOcrProcessor constructor argument

* Added recognizedText variable to class

* Added EventService

* Refactored TextRecognizeEvent

* Added EventService

* Fixed tests

* composer run cs:fix

* Basic code cleanup

Signed-off-by: Robin Windey <[email protected]>

* Adjustments for #144

* Add additional tests
* Refactor code to use more "high-level" SidecarFileAccessor

Signed-off-by: Robin Windey <[email protected]>

* Add docs for #144

* Add section for events to README.md
* Remove TOC workflow

Signed-off-by: Robin Windey <[email protected]>

* Fix php7.4 syntax

Signed-off-by: Robin Windey <[email protected]>

* Add check if event is emitted

Signed-off-by: Robin Windey <[email protected]>

* Change TextRecognizedEvent interface to be more generic

Linked to #144

* Adjust docs to match new interface

Signed-off-by: Robin Windey <[email protected]>

* Fix codecov

Signed-off-by: Robin Windey <[email protected]>

Signed-off-by: Robin Windey <[email protected]>
Co-authored-by: Guido Schmitz <[email protected]>
Co-authored-by: Robin Windey <[email protected]>
R0Wi added a commit that referenced this issue Sep 24, 2022
* Feature/impl#144 (#145)

* Register EventService class

* Fire TextRecognizedEvent

* Add TextRecognizedEvent class

* Create sidecar and add recognized text to result

* Added PdfOcrProcessor constructor argument

* Added recognizedText variable to class

* Added EventService

* Refactored TextRecognizeEvent

* Added EventService

* Fixed tests

* composer run cs:fix

* Basic code cleanup

Signed-off-by: Robin Windey <[email protected]>

* Adjustments for #144

* Add additional tests
* Refactor code to use more "high-level" SidecarFileAccessor

Signed-off-by: Robin Windey <[email protected]>

* Add docs for #144

* Add section for events to README.md
* Remove TOC workflow

Signed-off-by: Robin Windey <[email protected]>

* Fix php7.4 syntax

Signed-off-by: Robin Windey <[email protected]>

* Add check if event is emitted

Signed-off-by: Robin Windey <[email protected]>

* Change TextRecognizedEvent interface to be more generic

Linked to #144

* Adjust docs to match new interface

Signed-off-by: Robin Windey <[email protected]>

* Fix codecov

Signed-off-by: Robin Windey <[email protected]>

Signed-off-by: Robin Windey <[email protected]>
Co-authored-by: Guido Schmitz <[email protected]>
Co-authored-by: Robin Windey <[email protected]>

* Implement #140 (#148)

* Implement #140

Get installed tesseract languages from backend

Signed-off-by: Robin Windey <[email protected]>

* Fix OcrBackendInfoServiceTest for #140

Signed-off-by: Robin Windey <[email protected]>

* Introduce specific CommandException

Signed-off-by: Robin Windey <[email protected]>

Signed-off-by: Robin Windey <[email protected]>

Signed-off-by: Robin Windey <[email protected]>
Co-authored-by: g-schmitz <[email protected]>
Co-authored-by: Guido Schmitz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants