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

View File

@@ -8,8 +8,8 @@ __docformat__ = 'restructuredtext en'
import os, sys, re
from calibre.constants import iswindows, ispy3
from polyglot.builtins import iteritems, range, zip, native_string_type
from ebook_converter.constants import iswindows, ispy3
from ebook_converter.polyglot.builtins import iteritems, range, zip, native_string_type
if iswindows:
import ctypes.wintypes
@@ -174,7 +174,7 @@ class Detect(object):
# message and the asciized version of the text.
print('Non-ASCII text detected. You must set your Console\'s font to'
' Lucida Console or Consolas or some other TrueType font to see this text', file=self.stream, end=' -- ')
from calibre.utils.filenames import ascii_text
from ebook_converter.utils.filenames import ascii_text
print(ascii_text(t + text), file=self.stream, end='')
continue
if not ignore_errors: