1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-10 07:03:35 +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:
2020-04-11 19:33:43 +02:00
parent 69d2e536c5
commit 0f9792df36
252 changed files with 1925 additions and 2344 deletions

View File

@@ -27,17 +27,17 @@ import re
from lxml.etree import fromstring, tostring
from calibre.ebooks.metadata import (
from ebook_converter.ebooks.metadata import (
MetaInformation, authors_to_string, check_isbn, string_to_authors
)
from calibre.utils.date import isoformat, parse_date
from calibre.utils.imghdr import identify
from calibre.utils.localization import canonicalize_lang, lang_as_iso639_1
from calibre.utils.zipfile import ZipFile, safe_replace
from ebook_converter.utils.date import isoformat, parse_date
from ebook_converter.utils.imghdr import identify
from ebook_converter.utils.localization import canonicalize_lang, lang_as_iso639_1
from ebook_converter.utils.zipfile import ZipFile, safe_replace
from odf.draw import Frame as odFrame, Image as odImage
from odf.namespaces import DCNS, METANS, OFFICENS
from odf.opendocument import load as odLoad
from polyglot.builtins import as_unicode
from ebook_converter.polyglot.builtins import as_unicode
fields = {
'title': (DCNS, 'title'),