forked from LiveCarta/BookConverter
Change paths to books
This commit is contained in:
@@ -14,7 +14,7 @@ class DocxBook(BookSolver):
|
||||
|
||||
def __init__(self, book_id=0, access=None, main_logger=None, libre_locker=None):
|
||||
super().__init__(book_id, access, main_logger)
|
||||
self.book_type = 'docx'
|
||||
self.book_type = "docx"
|
||||
# critical section for occupying libreoffice by one thread
|
||||
self.libre_locker: Event() = libre_locker
|
||||
|
||||
@@ -53,9 +53,9 @@ class DocxBook(BookSolver):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
docx_file_path = '../../books/docx/music_inquiry.docx'
|
||||
docx_file_path = "../../books/docx/music_inquiry.docx"
|
||||
logger_object = BookLogger(
|
||||
name='docx', book_id=docx_file_path.split('/')[-1])
|
||||
name="docx", book_id=docx_file_path.split("/")[-1])
|
||||
locker = Event()
|
||||
locker.set()
|
||||
|
||||
@@ -70,5 +70,5 @@ if __name__ == "__main__":
|
||||
content, footnotes, top_level_headers, logger_object)
|
||||
content_dict = json_converter.convert_to_dict()
|
||||
|
||||
with codecs.open(docx_file_path.replace('docx', 'json'), 'w', encoding='utf-8') as f:
|
||||
with codecs.open(docx_file_path.replace("docx", "json"), "w", encoding="utf-8") as f:
|
||||
json.dump(content_dict, f, ensure_ascii=False)
|
||||
|
||||
Reference in New Issue
Block a user