Make hocr API experimental for now
This commit can be reverted when we are ready to release a new version.
This commit is contained in:
@@ -14,7 +14,11 @@ from ocrmypdf._pipelines._common import (
|
||||
configure_debug_logging,
|
||||
)
|
||||
from ocrmypdf._version import PROGRAM_NAME, __version__
|
||||
from ocrmypdf.api import Verbosity, configure_logging, hocr_to_ocr_pdf, ocr, pdf_to_hocr
|
||||
from ocrmypdf.api import (
|
||||
Verbosity,
|
||||
configure_logging,
|
||||
ocr,
|
||||
)
|
||||
from ocrmypdf.exceptions import (
|
||||
BadArgsError,
|
||||
DpiError,
|
||||
@@ -45,7 +49,6 @@ __all__ = [
|
||||
'ExitCode',
|
||||
'ExitCodeException',
|
||||
'helpers',
|
||||
'hocr_to_ocr_pdf',
|
||||
'hocrtransform',
|
||||
'hookimpl',
|
||||
'InputFileError',
|
||||
@@ -55,7 +58,6 @@ __all__ = [
|
||||
'OrientationConfidence',
|
||||
'OutputFileAccessError',
|
||||
'PageContext',
|
||||
'pdf_to_hocr',
|
||||
'pdfa',
|
||||
'PdfContext',
|
||||
'pdfinfo',
|
||||
|
||||
+6
-4
@@ -375,7 +375,7 @@ def ocr( # noqa: D417
|
||||
return run_pipeline(options=options, plugin_manager=plugin_manager)
|
||||
|
||||
|
||||
def pdf_to_hocr( # noqa: D417
|
||||
def _pdf_to_hocr( # noqa: D417
|
||||
input_pdf: Path,
|
||||
output_folder: Path,
|
||||
*,
|
||||
@@ -432,6 +432,8 @@ def pdf_to_hocr( # noqa: D417
|
||||
For arguments not explicitly documented here, see documentation for the
|
||||
equivalent command line parameter.
|
||||
|
||||
This API is **experimental** and subject to change.
|
||||
|
||||
Args:
|
||||
input_pdf: Input PDF file path.
|
||||
output_folder: Output folder path.
|
||||
@@ -468,7 +470,7 @@ def pdf_to_hocr( # noqa: D417
|
||||
return run_hocr_pipeline(options=options, plugin_manager=plugin_manager)
|
||||
|
||||
|
||||
def hocr_to_ocr_pdf( # noqa: D417
|
||||
def _hocr_to_ocr_pdf( # noqa: D417
|
||||
work_folder: Path,
|
||||
output_file: Path,
|
||||
*,
|
||||
@@ -496,6 +498,8 @@ def hocr_to_ocr_pdf( # noqa: D417
|
||||
For arguments not explicitly documented here, see documentation for the
|
||||
equivalent command line parameter.
|
||||
|
||||
This API is **experimental** and subject to change.
|
||||
|
||||
Args:
|
||||
work_folder: Work folder path, as generated by :func:`pdf_to_hocr`.
|
||||
output_file: Output PDF file path.
|
||||
@@ -543,8 +547,6 @@ __all__ = [
|
||||
'get_parser',
|
||||
'get_plugin_manager',
|
||||
'ocr',
|
||||
'pdf_to_hocr',
|
||||
'run_pipeline',
|
||||
'run_pipeline_cli',
|
||||
'hocr_to_ocr_pdf',
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user