👷🏾‍♂️ Read commands from cli.py's sub_images dict

As we don't want to maintain two lists of available processor commands,
read the list in cli.py from the setup.py. This seems to work fine.

Fixes #41.
master
Gerber, Mike 4 years ago
parent 23f6aedb34
commit 2f6229c47a

@ -1,6 +1,9 @@
from io import open
from setuptools import find_packages, setup
from qurator.ocrd_galley.cli import sub_images
console_scripts = ["%s=qurator.ocrd_galley.cli:main" % command for command in sub_images.keys()]
setup(
name="ocrd-galley",
author="Mike Gerber, The QURATOR SPK Team",
@ -11,26 +14,6 @@ setup(
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
namespace_packages=["qurator"],
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-recognize03=qurator.ocrd_galley.cli:main",
"ocrd-calamari-recognize=qurator.ocrd_galley.cli:main",
"ocrd-tesserocr-segment-region=qurator.ocrd_galley.cli:main",
"ocrd-tesserocr-segment-line=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",
]
"console_scripts": console_scripts,
},
)

Loading…
Cancel
Save