From e4cfcec5f3ddf6abb46384dab140d6692ec91e07 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Sat, 27 Jul 2019 04:04:33 -0700 Subject: [PATCH] docs: some cleanup --- docs/api.rst | 14 ++++++++------ docs/introduction.rst | 2 +- src/ocrmypdf/api.py | 6 +++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index 2e9e7597..09a68539 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -31,11 +31,13 @@ Instead, output should be managed by configuring logging. Parent process requirements --------------------------- -The :func:`ocrmypdf.run` function runs OCRmyPDF similar to command line -execution. To do this, it will: - create a monitoring thread - create -worker processes (forking itself) - manage the signal flags of worker -processes 0 execute other subprocesses (forking and executing other -programs) +The :func:`ocrmypdf.ocr` function runs OCRmyPDF similar to command line +execution. To do this, it will: + +- create a monitoring thread +- create worker processes (forking itself) +- manage the signal flags of worker processes +- execute other subprocesses (forking and executing other programs) The Python process that calls ``ocrmypdf.ocr()`` must be sufficiently privileged to perform these actions. If it is not, ``ocrmypdf()`` will @@ -88,7 +90,7 @@ When OCRmyPDF succeeds conditionally, it returns an integer exit code. Reference --------- -.. autofunction:: ocrmypdf.run +.. autofunction:: ocrmypdf.ocr .. autoclass:: ocrmypdf.Verbosity :members: diff --git a/docs/introduction.rst b/docs/introduction.rst index 0643c7e7..acc23aee 100644 --- a/docs/introduction.rst +++ b/docs/introduction.rst @@ -161,7 +161,7 @@ OCRmyPDF is also limited by the PDF specification: the spaces between words must be derived heuristically. Some PDF viewers do a better job of this than others. - Because some popular open source PDF viewers have a particularly hard - time with spaces betweem words, OCRmyPDF appends a space to each text + time with spaces between words, OCRmyPDF appends a space to each text element as a workaround (when using ``--pdf-renderer hocr``). While this mixes document structure with graphical information that ideally should be left to the PDF viewer to interpret, it improves diff --git a/src/ocrmypdf/api.py b/src/ocrmypdf/api.py index 8486632f..bc4a4e5a 100644 --- a/src/ocrmypdf/api.py +++ b/src/ocrmypdf/api.py @@ -64,10 +64,10 @@ def configure_logging(verbosity, progress_bar_friendly=True, manage_root_logger= similar to ocrmypdf command line interface. If not used, the external application should configure logging on its own. - ocrmypdf will perform all of its logging under the `"ocrmypdf"` logging namespace. - In addition, ocrmypdf imports pdfminer, which logs under `"pdfminer"`. A library + ocrmypdf will perform all of its logging under the ``"ocrmypdf"`` logging namespace. + In addition, ocrmypdf imports pdfminer, which logs under ``"pdfminer"``. A library user may wish to configure both; note that pdfminer is extremely chatty at the log - level logging.INFO. + level ``logging.INFO``. Library users may perform additional configuration afterwards.