1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-27 04:53:31 +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

@@ -9,9 +9,9 @@ from __future__ import absolute_import, division, print_function, unicode_litera
import codecs
import re
from calibre import force_unicode
from calibre.ebooks.metadata import MetaInformation
from polyglot.builtins import codepoint_to_chr, string_or_bytes, unicode_type, int_to_byte, filter
from ebook_converter import force_unicode
from ebook_converter.ebooks.metadata import MetaInformation
from ebook_converter.polyglot.builtins import codepoint_to_chr, string_or_bytes, unicode_type, int_to_byte, filter
title_pat = re.compile(br'\{\\info.*?\{\\title(.*?)(?<!\\)\}', re.DOTALL)
author_pat = re.compile(br'\{\\info.*?\{\\author(.*?)(?<!\\)\}', re.DOTALL)
@@ -232,7 +232,7 @@ def set_metadata(stream, options):
def find_tests():
import unittest
from io import BytesIO
from calibre.ebooks.metadata.book.base import Metadata
from ebook_converter.ebooks.metadata.book.base import Metadata
class Test(unittest.TestCase):