mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-03-07 10:05:45 +01:00
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:
@@ -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