hrishikeshrt / google_drive_ocr

Perform OCR using Google's Drive API v3
Other
38 stars 11 forks source link

Support write output to file #3

Closed halink0803 closed 2 years ago

halink0803 commented 2 years ago

It seems the package does not support write the output to file itself. It is great if the command line has an option to write the ocr result to output file like .txt or docs or any text extension.

Thank you

hrishikeshrt commented 2 years ago

The module does support specifying output_path name in perform_ocr function.

By default, it adds .google.txt to the image stem. So, if your input file was image.png, an output `image.google.txt' will be created beside it.

The CLI does not support specifying custom path, because often more than one images are in play. I am opening another issue (#4) to provide more control over the suffix etc through CLI.

halink0803 commented 2 years ago

@hrishikeshrt Yes, thank you for explanation, I found it. I saw the output to stdout and thought there is no file created. Nicely close this issue.