1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-02-23 02:25:53 +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

@@ -11,10 +11,10 @@ __docformat__ = 'restructuredtext en'
import re, string, traceback, numbers
from calibre import prints
from calibre.constants import DEBUG
from calibre.utils.formatter_functions import formatter_functions
from polyglot.builtins import unicode_type, error_message
from ebook_converter import prints
from ebook_converter.constants import DEBUG
from ebook_converter.utils.formatter_functions import formatter_functions
from ebook_converter.polyglot.builtins import unicode_type, error_message
class _Parser(object):
@@ -393,7 +393,7 @@ class ValidateFormatter(TemplateFormatter):
return self._validation_string
def validate(self, x):
from calibre.ebooks.metadata.book.base import Metadata
from ebook_converter.ebooks.metadata.book.base import Metadata
return self.safe_format(x, {}, 'VALIDATE ERROR', Metadata(''))