From 9585665232ca3559076f41566dd16fa9e1d82dbb Mon Sep 17 00:00:00 2001 From: Jeniamakarchik Date: Thu, 23 Apr 2020 18:47:36 +0300 Subject: [PATCH] add fixes for footnotes --- src/book.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/book.py b/src/book.py index f233044..74a0c37 100644 --- a/src/book.py +++ b/src/book.py @@ -445,6 +445,8 @@ class Book: anc_tag.replace_with(new_tag) content = self._clean_footnote_content(cont_tag.text) + cont_tag.decompose() + # new_tag = BeautifulSoup(features="lxml").new_tag('div') # new_tag['class'] = 'footnote-element' # new_tag['data-id'] = f'"{i}"' @@ -791,8 +793,8 @@ class Book: if __name__ == "__main__": folder_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - file_path = pathlib.Path(os.path.join(folder_path, 'html/0/quote_img.html')) - out_path = pathlib.Path(os.path.join(folder_path, 'json/quote_img.json')) + file_path = pathlib.Path(os.path.join(folder_path, 'html/0/music_inquiry.html')) + out_path = pathlib.Path(os.path.join(folder_path, 'json/music_inquiry.json')) logging_format = '%(asctime)s - %(levelname)s - %(message)s'