1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-01-04 18:14:11 +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,7 +8,7 @@ def html2text(html):
from html2text import HTML2Text
import re
if isinstance(html, bytes):
from calibre.ebooks.chardet import xml_to_unicode
from ebook_converter.ebooks.chardet import xml_to_unicode
html = xml_to_unicode(html, strip_encoding_pats=True, resolve_entities=True)[0]
# replace <u> tags with <span> as <u> becomes emphasis in html2text
html = re.sub(