From 5b8d88af4ce7f1d68e81774963edd0bcae8715c4 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Mon, 30 Jan 2017 15:08:02 -0800 Subject: [PATCH] Suggest use of aliases to hide docker run --- docs/installation.rst | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index ec3926d1..5f232895 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -39,15 +39,15 @@ OCRmyPDF will use all available CPU cores. By default, the VirtualBox machine i Assuming you have a Docker engine running, you can download one of the three available images: -+-----------------------------+-------------------------------------------+---------------------------------------------------------------------------------+ -| Image name | Download command | Notes | -+-----------------------------+-------------------------------------------+---------------------------------------------------------------------------------+ -| jbarlow83/ocrmypdf | `docker pull jbarlow83/ocrmypdf` | Latest ocrmypdf with Tesseract 3.04. Includes English, French, German, Spanish. | -+-----------------------------+-------------------------------------------+---------------------------------------------------------------------------------+ -| jbarlow83/ocrmypdf-polyglot | `docker pull jbarlow83/ocrmypdf-polyglot` | As above, with all available language packs. | -+-----------------------------+-------------------------------------------+---------------------------------------------------------------------------------+ -| jbarlow83/ocrmypdf-tess4 | `docker pull jbarlow83/ocrmypdf-tess4` | Latest ocrmypdf with Tesseract 4.00.00alpha and all language packs. | -+-----------------------------+-------------------------------------------+---------------------------------------------------------------------------------+ ++-----------------------------+---------------------------------------------+---------------------------------------------------------------------------------+ +| Image name | Download command | Notes | ++-----------------------------+---------------------------------------------+---------------------------------------------------------------------------------+ +| ocrmypdf | ``docker pull jbarlow83/ocrmypdf`` | Latest ocrmypdf with Tesseract 3.04. Includes English, French, German, Spanish. | ++-----------------------------+---------------------------------------------+---------------------------------------------------------------------------------+ +| ocrmypdf-polyglot | ``docker pull jbarlow83/ocrmypdf-polyglot`` | As above, with all available language packs. | ++-----------------------------+---------------------------------------------+---------------------------------------------------------------------------------+ +| ocrmypdf-tess4 | ``docker pull jbarlow83/ocrmypdf-tess4`` | Latest ocrmypdf with Tesseract 4.00.00alpha and all language packs. | ++-----------------------------+---------------------------------------------+---------------------------------------------------------------------------------+ For example: @@ -87,6 +87,20 @@ In this worked example, the current working directory contains an input file cal Note that ``ocrmypdf`` has its own separate ``-v VERBOSITYLEVEL`` argument to control debug verbosity. All Docker arguments should before the ``ocrmypdf`` image name and all arguments to ``ocrmypdf`` should be listed after. +For convenience, a shell alias can hide the docker command: + +.. code-block:: bash + + alias ocrmypdf='docker run --rm -v "$(pwd):/home/docker" ocrmypdf' + ocrmypdf --version # runs docker version + +Or in the wonderful `fish shell `_: + +.. code-block:: fish + + alias ocrmypdf 'docker run --rm -v (pwd):/home/docker ocrmypdf' + funcsave ocrmypdf + Installing on macOS -------------------