Finalize ‘exec’ migration and make it backward compatibility for now
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import os
|
||||
import pkg_resources
|
||||
|
||||
PROGRAM_NAME = 'ocrmypdf'
|
||||
@@ -6,5 +5,11 @@ PROGRAM_NAME = 'ocrmypdf'
|
||||
VERSION = pkg_resources.get_distribution('ocrmypdf').version
|
||||
|
||||
|
||||
def page_number(input_file):
|
||||
return int(os.path.basename(input_file)[0:6])
|
||||
# These imports are for v4.x backward compatibility for consumers of ocrmypdf
|
||||
# (if any). They are deprecated and will be removed in v5.x.
|
||||
from .exec import ghostscript, qpdf, tesseract, unpaper, get_program
|
||||
from .exceptions import ExitCode
|
||||
from .helpers import page_number, is_iterable_notstr
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user