From 11c0e9cee54d2a5c9a4683a897608ba11a29bf73 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Wed, 11 Dec 2019 12:39:50 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20sbb=5Ftextline=5Fdetector:=20Do?= =?UTF-8?q?=20not=20print=20PAGE=20output=20to=20stdout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ocrd-sbb-textline-detector uses ocrd_page's parse() to parse XML input, which writes the XML to stdout by default. Fix this by silencing it using parse()'s silence=True. --- qurator/sbb_textline_detector/ocrd_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qurator/sbb_textline_detector/ocrd_cli.py b/qurator/sbb_textline_detector/ocrd_cli.py index ad9c3ac..93340d3 100644 --- a/qurator/sbb_textline_detector/ocrd_cli.py +++ b/qurator/sbb_textline_detector/ocrd_cli.py @@ -72,7 +72,7 @@ class OcrdSbbTextlineDetectorRecognize(Processor): # Read segmentation results tmp_filename = os.path.join(tmp_dirname, file_id) + '.xml' - tmp_pcgts = ocrd_models.ocrd_page.parse(tmp_filename) + tmp_pcgts = ocrd_models.ocrd_page.parse(tmp_filename, silence=True) tmp_page = tmp_pcgts.get_Page() # Create a new PAGE file from the input file