Little changes working with presets

This commit is contained in:
Kibzik
2023-03-17 18:39:44 +03:00
parent e073ff0623
commit 40e153130b
4 changed files with 6 additions and 6 deletions

View File

@@ -58,8 +58,8 @@ def callback(ch, method, properties, body: bytes, main_logger: logging.Logger, l
"params": book_params "params": book_params
} }
thread = Thread(target=convert_book, kwargs=params) # thread = Thread(target=convert_book, kwargs=params)
# thread = Thread(target=local_convert_book, kwargs=params) thread = Thread(target=local_convert_book, kwargs=params)
thread.start() thread.start()
logging.log(logging.INFO, f"Active threads: {active_count()}.") logging.log(logging.INFO, f"Active threads: {active_count()}.")
# print(f"Active threads: {active_count()}.") # print(f"Active threads: {active_count()}.")

View File

@@ -172,7 +172,7 @@ class BookSolver:
self.status_wrapper.set_processing() self.status_wrapper.set_processing()
content_dict: Dict[str, List[Dict[Union[str, List]]]] = self.get_converted_book() content_dict: Dict[str, List[Dict[Union[str, List]]]] = self.get_converted_book()
[os.remove(path) for path in [self.book_path, [os.remove(path) for path in [self.book_path,
self.preset_path # self.preset_path
]] ]]
self.book_logger.log("Beginning of processing .json output.") self.book_logger.log("Beginning of processing .json output.")
self.status_wrapper.set_generating() self.status_wrapper.set_generating()

View File

@@ -52,7 +52,7 @@ class EpubBook(BookSolver):
if __name__ == "__main__": if __name__ == "__main__":
epub_file_path = f"../../books/epub/9781260455076.epub" epub_file_path = f"../../books/epub/9781264269044.epub"
logger_object = BookLogger(name="epub") logger_object = BookLogger(name="epub")
logger_object.configure_book_logger(book_id=epub_file_path.split("/")[-1]) logger_object.configure_book_logger(book_id=epub_file_path.split("/")[-1])

View File

@@ -33,9 +33,9 @@ class LiveCartaConfig:
"background-color", "background"], "background-color", "background"],
r"(^h[1-9]$)": ["list-style-type", "border-bottom", "border-top", "border-left", "border-right", r"(^h[1-9]$)": ["list-style-type", "border-bottom", "border-top", "border-left", "border-right",
"background-color", "background"], "background-color", "background"],
"^li$": ["text-align", "list-style-type"], "^li$": ["text-align", "list-style-type", "value"],
"^ul$": ["list-style-type"], "^ul$": ["list-style-type"],
"^ol$": ["list-style-type"] "^ol$": ["list-style-type", "reversed", "start"]
} }
# Dictionary mapping CSS style attribute names to names that should replace them # Dictionary mapping CSS style attribute names to names that should replace them