Remove some now-unused code; etc
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
.pytest_cache/
|
||||
.ruffus_history.sqlite
|
||||
.venv/
|
||||
.venv*/
|
||||
*.pyc
|
||||
*.sublime-*
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user