Rewrite style processing to make it common[Epub, Docx]

This commit is contained in:
Kiryl
2022-09-02 14:43:16 +03:00
parent d71ef44178
commit c602d9974a
4 changed files with 70 additions and 70 deletions

View File

@@ -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