run: also write out XML in single filename mode

This commit is contained in:
Robert Sachunsky 2025-04-01 23:13:24 +02:00
parent fe77171d45
commit dcf2ed5e22
2 changed files with 2 additions and 6 deletions

View file

@ -314,8 +314,7 @@ def layout(image, out, overwrite, dir_in, model, save_images, save_layout, save_
if dir_in: if dir_in:
eynollah.run(dir_in=dir_in, overwrite=overwrite) eynollah.run(dir_in=dir_in, overwrite=overwrite)
else: else:
pcgts = eynollah.run(image_filename=image) eynollah.run(image_filename=image)
eynollah.writer.write_pagexml(pcgts)
@main.command() @main.command()

View file

@ -4223,10 +4223,7 @@ class Eynollah:
pcgts = self.run_single() pcgts = self.run_single()
self.logger.info("Job done in %.1fs", time.time() - t0) self.logger.info("Job done in %.1fs", time.time() - t0)
#print("Job done in %.1fs" % (time.time() - t0)) #print("Job done in %.1fs" % (time.time() - t0))
if dir_in: self.writer.write_pagexml(pcgts)
self.writer.write_pagexml(pcgts)
else:
return pcgts
if dir_in: if dir_in:
self.logger.info("All jobs done in %.1fs", time.time() - t0_tot) self.logger.info("All jobs done in %.1fs", time.time() - t0_tot)