Merge branch 'master' of github.com:jbarlow83/OCRmyPDF
This commit is contained in:
@@ -28,7 +28,6 @@ from setuptools import setup, find_packages # nopep8
|
||||
from subprocess import STDOUT, check_output, CalledProcessError # nopep8
|
||||
from collections.abc import Mapping # nopep8
|
||||
import re # nopep8
|
||||
import os # nopep8
|
||||
|
||||
|
||||
missing_program = '''
|
||||
|
||||
@@ -33,7 +33,7 @@ from .hocrtransform import HocrTransform
|
||||
from .pdfinfo import PdfInfo, Colorspace
|
||||
from .pdfa import generate_pdfa_ps, encode_pdf_date
|
||||
from .helpers import re_symlink, is_iterable_notstr, page_number, flatten_groups
|
||||
from .exec import ghostscript, tesseract, qpdf
|
||||
from .exec import ghostscript, tesseract
|
||||
from .exceptions import UnsupportedImageFormatError, \
|
||||
DpiError, PriorOcrFoundError, InputFileError, EncryptedPdfError
|
||||
from . import leptonica
|
||||
|
||||
@@ -15,14 +15,11 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from subprocess import CalledProcessError, run, PIPE
|
||||
from subprocess import run, PIPE
|
||||
from functools import lru_cache
|
||||
import sys
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from . import get_version
|
||||
from ..exceptions import ExitCode, MissingDependencyError
|
||||
from ..exceptions import MissingDependencyError
|
||||
|
||||
|
||||
@lru_cache(maxsize=1)
|
||||
|
||||
@@ -15,15 +15,11 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OCRmyPDF. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from subprocess import CalledProcessError, run
|
||||
from tempfile import TemporaryFile
|
||||
from subprocess import run
|
||||
from functools import lru_cache
|
||||
import sys
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from . import get_version
|
||||
from ..exceptions import ExitCode, MissingDependencyError
|
||||
from ..exceptions import MissingDependencyError
|
||||
|
||||
|
||||
@lru_cache(maxsize=1)
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
from subprocess import CalledProcessError, STDOUT, PIPE, run
|
||||
from functools import lru_cache
|
||||
|
||||
from ..exceptions import InputFileError, SubprocessOutputError, \
|
||||
EncryptedPdfError
|
||||
from . import get_version
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
from pathlib import Path
|
||||
import concurrent.futures
|
||||
from collections import defaultdict, namedtuple
|
||||
from collections import defaultdict
|
||||
import logging
|
||||
import sys
|
||||
|
||||
@@ -137,10 +137,9 @@ def extract_image_generic(*, pike, root, log, image, xref, options):
|
||||
# generating a PNG from compressed data
|
||||
pim.as_pil_image().save(png_name(root, xref))
|
||||
return xref, '.png'
|
||||
else:
|
||||
return None
|
||||
|
||||
return True
|
||||
return None
|
||||
|
||||
|
||||
|
||||
def extract_images(pike, root, log, options, extract_fn):
|
||||
|
||||
@@ -34,7 +34,6 @@ Ghostscript's handling of pdfmark.
|
||||
from binascii import hexlify
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from shutil import copyfile
|
||||
from string import Template
|
||||
import pkg_resources
|
||||
import os
|
||||
@@ -42,7 +41,6 @@ import os
|
||||
from libxmp.utils import file_to_dict
|
||||
from libxmp import consts
|
||||
|
||||
from ocrmypdf.helpers import fspath
|
||||
|
||||
ICC_PROFILE_RELPATH = 'data/sRGB.icc'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user