forked from LiveCarta/BookConverter
remove logging_format
This commit is contained in:
@@ -14,8 +14,8 @@ from src.book_solver import BookSolver
|
|||||||
class DocxBook(BookSolver):
|
class DocxBook(BookSolver):
|
||||||
|
|
||||||
def __init__(self, book_id=0, access=None, html_path=None,
|
def __init__(self, book_id=0, access=None, html_path=None,
|
||||||
main_logger=None, libra_locker=None, logging_format='%(asctime)s - %(levelname)s - %(message)s'):
|
main_logger=None, libra_locker=None):
|
||||||
super().__init__(book_id, access, main_logger, logging_format)
|
super().__init__(book_id, access, main_logger)
|
||||||
self.book_type = 'docx'
|
self.book_type = 'docx'
|
||||||
self.html_path = html_path # path to html file, file appears after libre-conversion
|
self.html_path = html_path # path to html file, file appears after libre-conversion
|
||||||
self.libra_locker: Event() = libra_locker # critical section for occupying libreoffice by one thread
|
self.libra_locker: Event() = libra_locker # critical section for occupying libreoffice by one thread
|
||||||
@@ -24,6 +24,7 @@ class DocxBook(BookSolver):
|
|||||||
command = ['libreoffice', '--headless',
|
command = ['libreoffice', '--headless',
|
||||||
'--convert-to', 'html', f'{str(self.file_path)}',
|
'--convert-to', 'html', f'{str(self.file_path)}',
|
||||||
'--outdir', f'{out_dir_path}']
|
'--outdir', f'{out_dir_path}']
|
||||||
|
print(command)
|
||||||
result = subprocess.run(command, stdout=PIPE, stderr=PIPE)
|
result = subprocess.run(command, stdout=PIPE, stderr=PIPE)
|
||||||
self.logger_object.log(f'Result of libra conversion for book_{self.book_id}: {result.returncode}, {result.stdout}', logging.DEBUG)
|
self.logger_object.log(f'Result of libra conversion for book_{self.book_id}: {result.returncode}, {result.stdout}', logging.DEBUG)
|
||||||
self.logger_object.log(f'Any error while libra conversion for book_{self.book_id}: {result.stderr}', logging.DEBUG)
|
self.logger_object.log(f'Any error while libra conversion for book_{self.book_id}: {result.stderr}', logging.DEBUG)
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ class HTMLDocxPreprocessor:
|
|||||||
footnote_amt = len(footnote_anchors)
|
footnote_amt = len(footnote_anchors)
|
||||||
|
|
||||||
assert footnote_amt == len(footnote_content), \
|
assert footnote_amt == len(footnote_content), \
|
||||||
'Some ting went wrong with footnotes after libra conversion'
|
'Something went wrong with footnotes after libra conversion'
|
||||||
|
|
||||||
footnotes = []
|
footnotes = []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user