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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user