mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-04-18 03:53:32 +02: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:
@@ -2,7 +2,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera
|
||||
|
||||
""" elements.py -- replacements and helpers for ElementTree """
|
||||
|
||||
from polyglot.builtins import unicode_type, string_or_bytes
|
||||
from ebook_converter.polyglot.builtins import unicode_type, string_or_bytes
|
||||
|
||||
|
||||
class ElementWriter(object):
|
||||
|
||||
@@ -12,7 +12,7 @@ import codecs
|
||||
import os
|
||||
|
||||
from .pylrfopt import tagListOptimizer
|
||||
from polyglot.builtins import iteritems, string_or_bytes, unicode_type
|
||||
from ebook_converter.polyglot.builtins import iteritems, string_or_bytes, unicode_type
|
||||
|
||||
PYLRF_VERSION = "1.0"
|
||||
|
||||
|
||||
@@ -47,14 +47,14 @@ from .pylrf import (LrfWriter, LrfObject, LrfTag, LrfToc,
|
||||
STREAM_COMPRESSED, LrfTagStream, LrfStreamBase, IMAGE_TYPE_ENCODING,
|
||||
BINDING_DIRECTION_ENCODING, LINE_TYPE_ENCODING, LrfFileStream,
|
||||
STREAM_FORCE_COMPRESSED)
|
||||
from calibre.utils.date import isoformat
|
||||
from ebook_converter.utils.date import isoformat
|
||||
|
||||
DEFAULT_SOURCE_ENCODING = "cp1252" # default is us-windows character set
|
||||
DEFAULT_GENREADING = "fs" # default is yes to both lrf and lrs
|
||||
|
||||
from calibre import __appname__, __version__
|
||||
from calibre import entity_to_unicode
|
||||
from polyglot.builtins import string_or_bytes, unicode_type, iteritems, native_string_type
|
||||
from ebook_converter import __appname__, __version__
|
||||
from ebook_converter import entity_to_unicode
|
||||
from ebook_converter.polyglot.builtins import string_or_bytes, unicode_type, iteritems, native_string_type
|
||||
|
||||
|
||||
class LrsError(Exception):
|
||||
|
||||
Reference in New Issue
Block a user