diff options
| author | J08nY | 2022-07-07 15:49:00 +0200 |
|---|---|---|
| committer | J08nY | 2022-07-09 12:39:42 +0200 |
| commit | e5eee18c18a008d07686da0c8f2542b2f8c27fa1 (patch) | |
| tree | 363a394d8117bf22652fd69fa75469face6a2a59 /cc_cli.py | |
| parent | 4901a94d35140c18caf9b39f7db098636080a6cf (diff) | |
| download | sec-certs-e5eee18c18a008d07686da0c8f2542b2f8c27fa1.tar.gz sec-certs-e5eee18c18a008d07686da0c8f2542b2f8c27fa1.tar.zst sec-certs-e5eee18c18a008d07686da0c8f2542b2f8c27fa1.zip | |
Add OCR via tesseract.
Diffstat (limited to 'cc_cli.py')
| -rwxr-xr-x | cc_cli.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -9,7 +9,7 @@ import click from sec_certs.config.configuration import config from sec_certs.dataset import CCDataset -from sec_certs.utils.helpers import warn_if_missing_poppler +from sec_certs.utils.helpers import warn_if_missing_poppler, warn_if_missing_tesseract logger = logging.getLogger(__name__) @@ -87,7 +87,7 @@ def main( if inputpath and "build" not in actions_set: dset: CCDataset = CCDataset.from_json(Path(inputpath)) - if output: + if output and dset.root_dir != output: print( "Warning: you provided both input and output paths. The dataset from input path will get copied to output path." ) @@ -128,6 +128,7 @@ def main( ) sys.exit(1) warn_if_missing_poppler() + warn_if_missing_tesseract() dset.convert_all_pdfs() if "analyze" in actions_set: |
