From be41ff6d5436c2433360b894e56766ecab49391f Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Thu, 5 Apr 2018 21:23:44 -0700 Subject: [PATCH] Update flowchart [ci skip] --- docs/pipeline.svg | 875 +++++++++++++++++++++++---------------- src/ocrmypdf/__main__.py | 1 + 2 files changed, 519 insertions(+), 357 deletions(-) diff --git a/docs/pipeline.svg b/docs/pipeline.svg index 341d5d76..a8ac187e 100644 --- a/docs/pipeline.svg +++ b/docs/pipeline.svg @@ -1,392 +1,553 @@ - - - + + Pipeline: - -clustertasks - -Pipeline: + + +clustertasks + +Pipeline: -t0 - - - - -ocrmypdf.pipeline.triage + +t0 + + + + +ocrmypdf.pipeline.triage -t1 - - - - -ocrmypdf.pipeline.repair_pdf + +t1 + + + + +ocrmypdf.pipeline.repair_and_parse_pdf -t0->t1 - - + +t0->t1 + + -t2 - - -ocrmypdf.pipeline.split_pages + +t2 + + +ocrmypdf.pipeline.pre_split_pages -t1->t2 - - - - -t18 - - - - -ocrmypdf.pipeline.generate_postscript_stub - - -t1->t18 - - - - -t21 - - -ocrmypdf.pipeline.merge_pages_qpdf - - -t1->t21 - - - - -t3 - - - - -ocrmypdf.pipeline.rasterize_preview - - -t2->t3 - - - - -t4 - - - - -ocrmypdf.pipeline.orient_page - - -t2->t4 - - - - -t3->t4 - - - - -t5 - - - - -ocrmypdf.pipeline.rasterize_with_ghostscript - - -t4->t5 - - - - -t15 - - - - -ocrmypdf.pipeline.ocr_tesseract_textonly_pdf - - -t4->t15 - - - - -t12 - -ocrmypdf.pipeline.select_image_layer - - -t4->t12 - - - - -t19 - - - - -ocrmypdf.pipeline.skip_page - - -t4->t19 - - - - -t17 - - - - -ocrmypdf.pipeline.ocr_tesseract_and_render_pdf - - -t4->t17 - - - - -t6 - - - - -ocrmypdf.pipeline.preprocess_remove_background - - -t5->t6 - - - - -t11 - -ocrmypdf.pipeline.select_visible_page_image - - -t5->t11 - - - - -t7 - - - - -ocrmypdf.pipeline.preprocess_deskew - - -t6->t7 - - - - -t6->t11 - - - - -t8 - - - - -ocrmypdf.pipeline.preprocess_clean - - -t7->t8 - - - - -t7->t11 - - - - -t9 - - - - -ocrmypdf.pipeline.select_ocr_image - - -t8->t9 - - - - -t8->t11 - - - - -t10 - - - - -ocrmypdf.pipeline.ocr_tesseract_hocr - - -t9->t10 - - - - -t9->t15 - - - - -t13 - - - - -ocrmypdf.pipeline.render_hocr_page - - -t10->t13 - - - - -t14 - - - - -ocrmypdf.pipeline.render_hocr_debug_page - - -t10->t14 - - - - -t16 - - - - -ocrmypdf.pipeline.combine_layers - - -t13->t16 - - - - -t15->t16 - - - - -t11->t12 - - - - -t11->t14 - - - - -t11->t17 - - - - -t12->t16 - - + +t1->t2 + + -t20 - - -ocrmypdf.pipeline.merge_pages_ghostscript + +t20 + + + + +ocrmypdf.pipeline.generate_postscript_stub - -t16->t20 - - + + +t1->t20 + + - -t16->t21 - - + + +t24 + + +ocrmypdf.pipeline.merge_pages_mupdf - -t14->t20 - - + + +t1->t24 + + - -t14->t21 - - + + +t23 + + +ocrmypdf.pipeline.merge_pages_qpdf - -t19->t20 - - + + +t1->t23 + + - -t19->t21 - - + + +t3 + + + + +ocrmypdf.pipeline.split_page - -t17->t20 - - + + +t2->t3 + + - -t17->t21 - - + + +t4 + + +ocrmypdf.pipeline.ocr_or_skip - -t18->t20 - - + + +t3->t4 + + + + + +t5 + + + + +ocrmypdf.pipeline.rasterize_preview + + + +t4->t5 + + + + + +t6 + + + + +ocrmypdf.pipeline.orient_page + + + +t4->t6 + + + + + +t5->t6 + + + + + +t7 + + + + +ocrmypdf.pipeline.rasterize_with_ghostscript + + + +t6->t7 + + + + + +t17 + + + + +ocrmypdf.pipeline.ocr_tesseract_textonly_pdf + + + +t6->t17 + + + + + +t14 + +ocrmypdf.pipeline.select_image_layer + + + +t6->t14 + + + + + +t21 + + + + +ocrmypdf.pipeline.skip_page + + + +t6->t21 + + + + + +t19 + + + + +ocrmypdf.pipeline.ocr_tesseract_and_render_pdf + + + +t6->t19 + + + + + +t8 + + + + +ocrmypdf.pipeline.preprocess_remove_background + + + +t7->t8 + + + + + +t13 + +ocrmypdf.pipeline.select_visible_page_image + + + +t7->t13 + + + + + +t9 + + + + +ocrmypdf.pipeline.preprocess_deskew + + + +t8->t9 + + + + + +t8->t13 + + + + + +t10 + + + + +ocrmypdf.pipeline.preprocess_clean + + + +t9->t10 + + + + + +t9->t13 + + + + + +t11 + + + + +ocrmypdf.pipeline.select_ocr_image + + + +t10->t11 + + + + + +t10->t13 + + + + + +t12 + + + + +ocrmypdf.pipeline.ocr_tesseract_hocr + + + +t11->t12 + + + + + +t11->t17 + + + + + +t15 + + + + +ocrmypdf.pipeline.render_hocr_page + + + +t12->t15 + + + + + +t16 + + + + +ocrmypdf.pipeline.render_hocr_debug_page + + + +t12->t16 + + + + + +t25 + + +ocrmypdf.pipeline.merge_sidecars + + + +t12->t25 + + + + + +t18 + + + + +ocrmypdf.pipeline.combine_layers + + + +t15->t18 + + + + + +t17->t18 + + + + + +t17->t25 + + + + + +t13->t14 + + + + + +t13->t16 + + + + + +t13->t19 + + + + + +t14->t18 + + -t22 - - -ocrmypdf.pipeline.copy_final + +t22 + + +ocrmypdf.pipeline.merge_pages_ghostscript - -t20->t22 - - + + +t18->t22 + + + + + +t18->t24 + + + + + +t18->t23 + + + + + +t16->t22 + + + + + +t16->t24 + + + + + +t16->t23 + + -t21->t22 - - + +t21->t22 + + + + + +t21->t24 + + + + + +t21->t23 + + + + + +t19->t22 + + + + + +t19->t24 + + + + + +t19->t23 + + + + + +t19->t25 + + + + + +t20->t22 + + + + + +t26 + + +ocrmypdf.pipeline.copy_final + + + +t22->t26 + + + + + +t24->t26 + + + + + +t23->t26 + + diff --git a/src/ocrmypdf/__main__.py b/src/ocrmypdf/__main__.py index b6a9f02c..2d0a0a0c 100755 --- a/src/ocrmypdf/__main__.py +++ b/src/ocrmypdf/__main__.py @@ -879,6 +879,7 @@ def run_pipeline(): if options.flowchart: _log.info("Flowchart saved to {}".format(options.flowchart)) + return ExitCode.ok elif options.output_file == '-': _log.info("Output sent to stdout") elif os.path.samefile(options.output_file, os.devnull):