forked from LiveCarta/BookConverter
Rewrite style processing to make it common[Epub, Docx]
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from src.book_solver import BookSolver
|
||||
from src.style_preprocessor import CSSPreprocessor
|
||||
from src.epub_converter.html_epub_processor import HtmlEpubPreprocessor
|
||||
from src.style_preprocessor import StylePreprocessor
|
||||
from src.epub_converter.html_epub_processor import HtmlEpubProcessor
|
||||
from src.epub_converter.epub_converter import EpubConverter
|
||||
|
||||
|
||||
@@ -25,11 +25,11 @@ class EpubBook(BookSolver):
|
||||
json for LiveCarta platform
|
||||
|
||||
"""
|
||||
css_processor = CSSPreprocessor()
|
||||
html_processor = HtmlEpubPreprocessor(
|
||||
self.preset_path, logger=self.logger_object)
|
||||
style_processor = StylePreprocessor()
|
||||
html_processor = HtmlEpubProcessor(
|
||||
logger=self.logger_object)
|
||||
json_converter = EpubConverter(
|
||||
self.book_path, access=self.access, logger=self.logger_object,
|
||||
css_processor=css_processor, html_processor=html_processor)
|
||||
style_processor=style_processor, html_processor=html_processor)
|
||||
content_dict = json_converter.convert_to_dict()
|
||||
return content_dict
|
||||
|
||||
Reference in New Issue
Block a user