diff --git a/wrapper/qurator/ocrd_galley/cli.py b/wrapper/qurator/ocrd_galley/cli.py index 427ae21..6c39da5 100644 --- a/wrapper/qurator/ocrd_galley/cli.py +++ b/wrapper/qurator/ocrd_galley/cli.py @@ -8,12 +8,32 @@ DOCKER_IMAGE_TAG = os.environ.get("DOCKER_IMAGE_TAG", "latest") LOG_LEVEL = os.environ.get("LOG_LEVEL", "INFO") +sub_images = { + "ocrd": "core", + "ocrd-olena-binarize": "ocrd_olena", + "ocrd-sbb-binarize": "sbb_binarization", + "ocrd-sbb-textline-detector": "sbb_textline_detector", + "ocrd-calamari-recognize": "ocrd_calamari", + "ocrd-tesserocr-recognize": "ocrd_tesserocr", + "ocrd-dinglehopper": "dinglehopper", + "ocrd-cis-ocropy-clip": "ocrd_cis", + "ocrd-cis-ocropy-resegment": "ocrd_cis", + "ocrd-cis-ocropy-segment": "ocrd_cis", + "ocrd-cis-ocropy-deskew": "ocrd_cis", + "ocrd-cis-ocropy-denoise": "ocrd_cis", + "ocrd-cis-ocropy-binarize": "ocrd_cis", + "ocrd-cis-ocropy-dewarp": "ocrd_cis", + "ocrd-cis-ocropy-recognize": "ocrd_cis", + "ocrd-fileformat-transform": "ocrd_fileformat", +} + + def main(): argv = sys.argv.copy() argv[0] = os.path.basename(argv[0]) - if argv[0] == "ocrd": - docker_image = "%s-core:%s" % (DOCKER_IMAGE_PREFIX, DOCKER_IMAGE_TAG) + sub_image = sub_images[argv[0]] + docker_image = "%s-%s:%s" % (DOCKER_IMAGE_PREFIX, sub_image, DOCKER_IMAGE_TAG) docker_run(argv, docker_image) diff --git a/wrapper/setup.py b/wrapper/setup.py index 6abfc3a..077c774 100644 --- a/wrapper/setup.py +++ b/wrapper/setup.py @@ -13,6 +13,21 @@ setup( entry_points={ "console_scripts": [ "ocrd=qurator.ocrd_galley.cli:main", + "ocrd-olena-binarize=qurator.ocrd_galley.cli:main", + "ocrd-sbb-binarize=qurator.ocrd_galley.cli:main", + "ocrd-sbb-textline-detector=qurator.ocrd_galley.cli:main", + "ocrd-calamari-recognize=qurator.ocrd_galley.cli:main", + "ocrd-tesserocr-recognize=qurator.ocrd_galley.cli:main", + "ocrd-dinglehopper=qurator.ocrd_galley.cli:main", + "ocrd-cis-ocropy-clip=qurator.ocrd_galley.cli:main", + "ocrd-cis-ocropy-resegment=qurator.ocrd_galley.cli:main", + "ocrd-cis-ocropy-segment=qurator.ocrd_galley.cli:main", + "ocrd-cis-ocropy-deskew=qurator.ocrd_galley.cli:main", + "ocrd-cis-ocropy-denoise=qurator.ocrd_galley.cli:main", + "ocrd-cis-ocropy-binarize=qurator.ocrd_galley.cli:main", + "ocrd-cis-ocropy-dewarp=qurator.ocrd_galley.cli:main", + "ocrd-cis-ocropy-recognize=qurator.ocrd_galley.cli:main", + "ocrd-fileformat-transform=qurator.ocrd_galley.cli:main", ] }, )