mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-06-10 04:39:54 +02:00
cli: fail early with inconsistent plotting options
This commit is contained in:
parent
045ab86fd5
commit
22184024fa
1 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import sys
|
||||||
import click
|
import click
|
||||||
from ocrd_utils import initLogging, setOverrideLogLevel
|
from ocrd_utils import initLogging, setOverrideLogLevel
|
||||||
from sbb_newspapers_org_image.eynollah import Eynollah
|
from sbb_newspapers_org_image.eynollah import Eynollah
|
||||||
|
@ -109,6 +110,12 @@ def main(
|
||||||
if log_level:
|
if log_level:
|
||||||
setOverrideLogLevel(log_level)
|
setOverrideLogLevel(log_level)
|
||||||
initLogging()
|
initLogging()
|
||||||
|
if not enable_plotting and (save_layout or save_deskewed or save_all or save_images):
|
||||||
|
print("Error: You used one of -sl, -sd, -sa or -si but did not enable plotting with -ep")
|
||||||
|
sys.exit(1)
|
||||||
|
elif enable_plotting and not (save_layout or save_deskewed or save_all or save_images):
|
||||||
|
print("Error: You used -ep to enable plotting but set none of -sl, -sd, -sa or -si")
|
||||||
|
sys.exit(1)
|
||||||
eynollah = Eynollah(
|
eynollah = Eynollah(
|
||||||
image,
|
image,
|
||||||
None,
|
None,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue