add fixes for footnotes

This commit is contained in:
Jeniamakarchik
2020-04-23 18:47:36 +03:00
parent ab5ce00a6a
commit 9585665232

View File

@@ -445,6 +445,8 @@ class Book:
anc_tag.replace_with(new_tag) anc_tag.replace_with(new_tag)
content = self._clean_footnote_content(cont_tag.text) content = self._clean_footnote_content(cont_tag.text)
cont_tag.decompose()
# new_tag = BeautifulSoup(features="lxml").new_tag('div') # new_tag = BeautifulSoup(features="lxml").new_tag('div')
# new_tag['class'] = 'footnote-element' # new_tag['class'] = 'footnote-element'
# new_tag['data-id'] = f'"{i}"' # new_tag['data-id'] = f'"{i}"'
@@ -791,8 +793,8 @@ class Book:
if __name__ == "__main__": if __name__ == "__main__":
folder_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 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')) file_path = pathlib.Path(os.path.join(folder_path, 'html/0/music_inquiry.html'))
out_path = pathlib.Path(os.path.join(folder_path, 'json/quote_img.json')) out_path = pathlib.Path(os.path.join(folder_path, 'json/music_inquiry.json'))
logging_format = '%(asctime)s - %(levelname)s - %(message)s' logging_format = '%(asctime)s - %(levelname)s - %(message)s'