Rename post_process -> postprocess

For consistency with preprocess
This commit is contained in:
James R. Barlow
2023-10-24 00:54:30 -07:00
parent 23951c9e38
commit c278fecb34
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -380,7 +380,7 @@ def process_page(page_context: PageContext) -> tuple[Path, Path | None, int]:
return ocr_image_out, pdf_page_from_image_out, orientation_correction
def post_process(
def postprocess(
pdf_file: Path, context: PdfContext, executor: Executor
) -> tuple[Path, Sequence[str]]:
"""Postprocess the PDF file."""
+2 -2
View File
@@ -29,7 +29,7 @@ from ocrmypdf._pipeline import (
from ocrmypdf._pipelines.common import (
HOCRResult,
manage_work_folder,
post_process,
postprocess,
report_output_pdf,
set_logging_tls,
setup_pipeline,
@@ -101,7 +101,7 @@ def exec_hocr_to_ocr_pdf(context: PdfContext, executor: Executor) -> Sequence[st
if options.output_type != 'none':
# PDF/A and metadata
log.info("Postprocessing...")
pdf, messages = post_process(pdf, context, executor)
pdf, messages = postprocess(pdf, context, executor)
# Copy PDF file to destination
copy_final(pdf, options.output_file, context)
+2 -2
View File
@@ -37,7 +37,7 @@ from ocrmypdf._pipelines.common import (
cli_exception_handler,
manage_debug_log_handler,
manage_work_folder,
post_process,
postprocess,
process_page,
report_output_pdf,
set_logging_tls,
@@ -152,7 +152,7 @@ def exec_concurrent(context: PdfContext, executor: Executor) -> Sequence[str]:
if options.output_type != 'none':
# PDF/A and metadata
log.info("Postprocessing...")
pdf, messages = post_process(pdf, context, executor)
pdf, messages = postprocess(pdf, context, executor)
# Copy PDF file to destination
copy_final(pdf, options.output_file, context)