forked from LiveCarta/BookConverter
add fixes for footnotes
This commit is contained in:
@@ -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'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user