mirror of
https://github.com/qurator-spk/ocrd-galley.git
synced 2025-06-09 14:49:53 +02:00
🐛 Fix installing the wrapper
Since the introduction of color in the wrapper (for printing out a warning if not using the "lastest" images), we had a circular dependency in setup.py. Fix this by moving the sub_images list to sub_images.py.
This commit is contained in:
parent
8abec9ea9f
commit
10a8020243
4 changed files with 41 additions and 43 deletions
|
@ -1 +0,0 @@
|
|||
from .cli import *
|
|
@ -5,6 +5,7 @@ import colorama
|
|||
from pathlib import Path
|
||||
from termcolor import colored
|
||||
|
||||
from .sub_images import sub_images
|
||||
|
||||
DOCKER_IMAGE_PREFIX = os.environ.get("DOCKER_IMAGE_PREFIX", "quratorspk/ocrd-galley")
|
||||
DOCKER_IMAGE_TAG = os.environ.get("DOCKER_IMAGE_TAG", "latest")
|
||||
|
@ -16,47 +17,6 @@ XDG_CONFIG_HOME = os.environ.get("XDG_CONFIG_HOME", Path.home() / ".config")
|
|||
XDG_DATA_HOME = os.environ.get("XDG_DATA_HOME", Path.home() / ".local" / "share")
|
||||
|
||||
|
||||
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-calamari-recognize03": "ocrd_calamari03",
|
||||
"ocrd-tesserocr-segment-region": "ocrd_tesserocr",
|
||||
"ocrd-tesserocr-segment-line": "ocrd_tesserocr",
|
||||
"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",
|
||||
"ocrd-segment-extract-pages": "ocrd_segment",
|
||||
"ocrd-segment-extract-regions": "ocrd_segment",
|
||||
"ocrd-segment-extract-lines": "ocrd_segment",
|
||||
"ocrd-segment-from-masks": "ocrd_segment",
|
||||
"ocrd-segment-from-coco": "ocrd_segment",
|
||||
"ocrd-segment-repair": "ocrd_segment",
|
||||
"ocrd-segment-evaluate": "ocrd_segment",
|
||||
"ocrd-preprocess-image": "ocrd_wrap",
|
||||
"ocrd-skimage-normalize": "ocrd_wrap",
|
||||
"ocrd-skimage-denoise-raw": "ocrd_wrap",
|
||||
"ocrd-skimage-binarize": "ocrd_wrap",
|
||||
"ocrd-skimage-denoise": "ocrd_wrap",
|
||||
"ocrd-eynollah-segment": "eynollah",
|
||||
"ocrd-anybaseocr-crop": "ocrd_anybaseocr",
|
||||
"ocrd-anybaseocr-deskew": "ocrd_anybaseocr",
|
||||
|
||||
# non OCR-D CLI
|
||||
"ocr-transform": "ocrd_fileformat",
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
colorama.init()
|
||||
|
||||
|
|
39
wrapper/qurator/ocrd_galley/sub_images.py
Normal file
39
wrapper/qurator/ocrd_galley/sub_images.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
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-calamari-recognize03": "ocrd_calamari03",
|
||||
"ocrd-tesserocr-segment-region": "ocrd_tesserocr",
|
||||
"ocrd-tesserocr-segment-line": "ocrd_tesserocr",
|
||||
"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",
|
||||
"ocrd-segment-extract-pages": "ocrd_segment",
|
||||
"ocrd-segment-extract-regions": "ocrd_segment",
|
||||
"ocrd-segment-extract-lines": "ocrd_segment",
|
||||
"ocrd-segment-from-masks": "ocrd_segment",
|
||||
"ocrd-segment-from-coco": "ocrd_segment",
|
||||
"ocrd-segment-repair": "ocrd_segment",
|
||||
"ocrd-segment-evaluate": "ocrd_segment",
|
||||
"ocrd-preprocess-image": "ocrd_wrap",
|
||||
"ocrd-skimage-normalize": "ocrd_wrap",
|
||||
"ocrd-skimage-denoise-raw": "ocrd_wrap",
|
||||
"ocrd-skimage-binarize": "ocrd_wrap",
|
||||
"ocrd-skimage-denoise": "ocrd_wrap",
|
||||
"ocrd-eynollah-segment": "eynollah",
|
||||
"ocrd-anybaseocr-crop": "ocrd_anybaseocr",
|
||||
"ocrd-anybaseocr-deskew": "ocrd_anybaseocr",
|
||||
|
||||
# non OCR-D CLI
|
||||
"ocr-transform": "ocrd_fileformat",
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
from io import open
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
from qurator.ocrd_galley.cli import sub_images
|
||||
from qurator.ocrd_galley.sub_images import sub_images
|
||||
console_scripts = ["%s=qurator.ocrd_galley.cli:main" % command for command in sub_images.keys()]
|
||||
|
||||
with open("requirements.txt") as fp:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue