From 61afef549e8775acc0b7a059bf186d447a32d1f5 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Fri, 17 May 2019 14:25:17 -0700 Subject: [PATCH] Remove some now-unused code; etc --- .gitignore | 1 + docs/installation.rst | 4 ++-- src/ocrmypdf/helpers.py | 12 ------------ 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index b2881fb4..83ec1729 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ .pytest_cache/ .ruffus_history.sqlite .venv/ +.venv*/ *.pyc *.sublime-* diff --git a/docs/installation.rst b/docs/installation.rst index 73380839..b669320c 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -118,13 +118,13 @@ install the system version to get most of the dependencies: ocrmypdf \ python3-pip -There are a few dependency changes between ocrmypdf 6.1.2 and 7.x. Let's get +There are a few system dependency changes since ocrmypdf 6.1.2. Let's get these, too. .. code-block:: bash sudo apt-get install \ - libexempi3 \ + libxml2 \ pngquant Then install the most recent ocrmypdf for the local user and set the user's ``PATH`` to check for the user's Python packages. diff --git a/src/ocrmypdf/helpers.py b/src/ocrmypdf/helpers.py index 1e9a2cb7..683cc815 100644 --- a/src/ocrmypdf/helpers.py +++ b/src/ocrmypdf/helpers.py @@ -66,10 +66,6 @@ def re_symlink(input_file, soft_link_name, *args, **kwargs): os.symlink(os.path.abspath(input_file), soft_link_name) -def is_iterable_notstr(thing): - return isinstance(thing, Iterable) and not isinstance(thing, str) - - def page_number(input_file): """Get one-based page number implied by filename (000002.pdf -> 2)""" return int(os.path.basename(os.fspath(input_file))[0:6]) @@ -125,14 +121,6 @@ def is_file_writable(test_file): return True -def flatten_groups(groups): - for obj in groups: - if is_iterable_notstr(obj): - yield from obj - else: - yield obj - - def deprecated(func): """Warn that function is deprecated"""