mirror of
https://github.com/qurator-spk/ocrd-galley.git
synced 2025-07-04 02:39:51 +02:00
💄 Make 'Using ...:test-github-actions red' message red
This commit is contained in:
parent
00ea7c363d
commit
e1f29dd5b6
3 changed files with 11 additions and 1 deletions
|
@ -1,7 +1,9 @@
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import colorama
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from termcolor import colored
|
||||||
|
|
||||||
|
|
||||||
DOCKER_IMAGE_PREFIX = os.environ.get("DOCKER_IMAGE_PREFIX", "quratorspk/ocrd-galley")
|
DOCKER_IMAGE_PREFIX = os.environ.get("DOCKER_IMAGE_PREFIX", "quratorspk/ocrd-galley")
|
||||||
|
@ -56,6 +58,8 @@ sub_images = {
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
colorama.init()
|
||||||
|
|
||||||
argv = sys.argv.copy()
|
argv = sys.argv.copy()
|
||||||
argv[0] = os.path.basename(argv[0])
|
argv[0] = os.path.basename(argv[0])
|
||||||
|
|
||||||
|
@ -63,7 +67,7 @@ def main():
|
||||||
docker_image = "%s-%s:%s" % (DOCKER_IMAGE_PREFIX, sub_image, DOCKER_IMAGE_TAG)
|
docker_image = "%s-%s:%s" % (DOCKER_IMAGE_PREFIX, sub_image, DOCKER_IMAGE_TAG)
|
||||||
|
|
||||||
if DOCKER_IMAGE_TAG != "latest":
|
if DOCKER_IMAGE_TAG != "latest":
|
||||||
print(f"Using {docker_image}")
|
print(colored(f"Using {docker_image}", 'red'))
|
||||||
docker_run(argv, docker_image)
|
docker_run(argv, docker_image)
|
||||||
|
|
||||||
|
|
||||||
|
|
2
wrapper/requirements.txt
Normal file
2
wrapper/requirements.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
colorama
|
||||||
|
termcolor
|
|
@ -4,6 +4,9 @@ from setuptools import find_packages, setup
|
||||||
from qurator.ocrd_galley.cli import sub_images
|
from qurator.ocrd_galley.cli import sub_images
|
||||||
console_scripts = ["%s=qurator.ocrd_galley.cli:main" % command for command in sub_images.keys()]
|
console_scripts = ["%s=qurator.ocrd_galley.cli:main" % command for command in sub_images.keys()]
|
||||||
|
|
||||||
|
with open("requirements.txt") as fp:
|
||||||
|
install_requires = fp.read()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="ocrd-galley",
|
name="ocrd-galley",
|
||||||
author="Mike Gerber, The QURATOR SPK Team",
|
author="Mike Gerber, The QURATOR SPK Team",
|
||||||
|
@ -13,6 +16,7 @@ setup(
|
||||||
license="Apache",
|
license="Apache",
|
||||||
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
|
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
|
||||||
namespace_packages=["qurator"],
|
namespace_packages=["qurator"],
|
||||||
|
install_requires=install_requires,
|
||||||
entry_points={
|
entry_points={
|
||||||
"console_scripts": console_scripts,
|
"console_scripts": console_scripts,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue