epub_presets

This commit is contained in:
Kiryl
2022-09-06 13:19:26 +03:00
parent 4f4dbab94c
commit 96c7421e71

View File

@@ -8,7 +8,7 @@ from src.util.helpers import BookLogger
class HtmlEpubProcessor:
def __init__(self, preset_path: str = "presets/presets.json", logger: BookLogger = None):
def __init__(self, preset_path: str = "presets/epub_presets.json", logger: BookLogger = None):
self.preset = json.load(open(preset_path))
self.logger = logger
self.name2action = {
@@ -173,8 +173,8 @@ class HtmlEpubProcessor:
# wrap subtag with items
kwargs["tag"].append(tag_to_insert)
def _process_tags(self,
chapter_tag: BeautifulSoup,
@staticmethod
def _process_tags(chapter_tag: BeautifulSoup,
rules: List[Dict[str, Union[List[str], str, Dict[str, Union[List[Dict[str, str]], int, str]]]]],
action):
"""