Convert calibre modules to ebook_converter.
Here is the first batch of modules, which are needed for converting several formats to LRF. Some of the logic has been change, more cleanups will follow.
This commit is contained in:
1 parent
69d2e536c5
commit
0f9792df36
252 files changed
+1925
-2344
No files matched your search
@@ -7,7 +7,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
||||
from base64 import standard_b64decode, standard_b64encode
|
||||
from binascii import hexlify, unhexlify
|
||||
|
||||
from polyglot.builtins import unicode_type
|
||||
from ebook_converter.polyglot.builtins import unicode_type
|
||||
|
||||
|
||||
def as_base64_bytes(x, enc='utf-8'):
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
from polyglot.builtins import is_py3
|
||||
from ebook_converter.polyglot.builtins import is_py3
|
||||
if is_py3:
|
||||
from functools import lru_cache
|
||||
else:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# vim:fileencoding=utf-8
|
||||
# License: GPL v3 Copyright: 2019, Eli Schwartz <eschwartz@archlinux.org>
|
||||
|
||||
from polyglot.builtins import is_py3
|
||||
from ebook_converter.polyglot.builtins import is_py3
|
||||
|
||||
if is_py3:
|
||||
from html.entities import name2codepoint
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from polyglot.builtins import is_py3
|
||||
from ebook_converter.polyglot.builtins import is_py3
|
||||
|
||||
if is_py3:
|
||||
from urllib.request import (build_opener, getproxies, install_opener, # noqa
|
||||
|
||||
Reference in new issue
Block a user