mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-03-24 19:33:33 +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:
@@ -10,12 +10,12 @@ from bs4 import ( # noqa
|
||||
SoupStrainer, Tag, __version__
|
||||
)
|
||||
|
||||
from polyglot.builtins import unicode_type
|
||||
from ebook_converter.polyglot.builtins import unicode_type
|
||||
|
||||
|
||||
def parse_html(markup):
|
||||
from calibre.ebooks.chardet import strip_encoding_declarations, xml_to_unicode, substitute_entites
|
||||
from calibre.utils.cleantext import clean_xml_chars
|
||||
from ebook_converter.ebooks.chardet import strip_encoding_declarations, xml_to_unicode, substitute_entites
|
||||
from ebook_converter.utils.cleantext import clean_xml_chars
|
||||
if isinstance(markup, unicode_type):
|
||||
markup = strip_encoding_declarations(markup)
|
||||
markup = substitute_entites(markup)
|
||||
|
||||
Reference in New Issue
Block a user