mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-22 16:10:30 +00:00
Migrated pypdf2 to the now active developed pypdf
This commit is contained in:
parent
791bc9621a
commit
c21a870b8e
@ -36,11 +36,17 @@ except (ImportError, RuntimeError) as e:
|
|||||||
log.debug('Cannot import Image, generating pdf covers for pdf uploads will not work: %s', e)
|
log.debug('Cannot import Image, generating pdf covers for pdf uploads will not work: %s', e)
|
||||||
use_generic_pdf_cover = True
|
use_generic_pdf_cover = True
|
||||||
|
|
||||||
|
try:
|
||||||
|
from PyPDF import PdfReader
|
||||||
|
use_pdf_meta = True
|
||||||
|
except ImportError as ex:
|
||||||
|
log.debug('PyPDF is recommended for best performance in metadata extracting from pdf files: %s', ex)
|
||||||
try:
|
try:
|
||||||
from PyPDF2 import PdfReader
|
from PyPDF2 import PdfReader
|
||||||
use_pdf_meta = True
|
use_pdf_meta = True
|
||||||
except ImportError as ex:
|
except ImportError as ex:
|
||||||
log.debug('PyPDF2 is recommended for best performance in metadata extracting from pdf files: %s', ex)
|
log.debug('PyPDF is recommended for best performance in metadata extracting from pdf files: %s', ex)
|
||||||
|
log.debug('PyPdf2 is also possible for metadata extracting from pdf files, but not recommended anymore')
|
||||||
try:
|
try:
|
||||||
from PyPDF3 import PdfFileReader as PdfReader
|
from PyPDF3 import PdfFileReader as PdfReader
|
||||||
use_pdf_meta = True
|
use_pdf_meta = True
|
||||||
|
@ -7,7 +7,7 @@ Flask-Principal>=0.3.2,<0.5.1
|
|||||||
backports_abc>=0.4
|
backports_abc>=0.4
|
||||||
Flask>=1.0.2,<2.2.0
|
Flask>=1.0.2,<2.2.0
|
||||||
iso-639>=0.4.5,<0.5.0
|
iso-639>=0.4.5,<0.5.0
|
||||||
PyPDF2>=1.28,<3.1.0
|
PyPDF>=3.0.0,<3.3.0
|
||||||
pytz>=2016.10
|
pytz>=2016.10
|
||||||
requests>=2.11.1,<2.28.0
|
requests>=2.11.1,<2.28.0
|
||||||
SQLAlchemy>=1.3.0,<1.5.0
|
SQLAlchemy>=1.3.0,<1.5.0
|
||||||
|
@ -23,6 +23,7 @@ classifiers =
|
|||||||
Programming Language :: Python :: 3.8
|
Programming Language :: Python :: 3.8
|
||||||
Programming Language :: Python :: 3.9
|
Programming Language :: Python :: 3.9
|
||||||
Programming Language :: Python :: 3.10
|
Programming Language :: Python :: 3.10
|
||||||
|
Programming Language :: Python :: 3.11
|
||||||
Operating System :: OS Independent
|
Operating System :: OS Independent
|
||||||
keywords =
|
keywords =
|
||||||
calibre
|
calibre
|
||||||
@ -46,7 +47,7 @@ install_requires =
|
|||||||
backports_abc>=0.4
|
backports_abc>=0.4
|
||||||
Flask>=1.0.2,<2.2.0
|
Flask>=1.0.2,<2.2.0
|
||||||
iso-639>=0.4.5,<0.5.0
|
iso-639>=0.4.5,<0.5.0
|
||||||
PyPDF2>=1.28,<3.1.0
|
PyPDF>=3.0.0,<3.3.0
|
||||||
pytz>=2016.10
|
pytz>=2016.10
|
||||||
requests>=2.11.1,<2.28.0
|
requests>=2.11.1,<2.28.0
|
||||||
SQLAlchemy>=1.3.0,<1.5.0
|
SQLAlchemy>=1.3.0,<1.5.0
|
||||||
|
Loading…
Reference in New Issue
Block a user