Commit 88a85486 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Debug document list element

parent 6264950d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -24,14 +24,20 @@ def upgradeIndex(args: argparse.Namespace) -> None:
        with open(args.indexTemplate, 'r', encoding='utf-8') as dest_file:
            dest_html = dest_file.read()

        print(source_html)
        print(dest_html)
        # Parse both HTML files
        source_soup = BeautifulSoup(source_html, 'html.parser')
        dest_soup = BeautifulSoup(dest_html, 'html.parser')

        print(source_soup)
        print(dest_soup)
        # Find the <ul> element in both the source and destination HTML
        source_ul = source_soup.find('ul', id='document-list')
        dest_ul = dest_soup.find('ul', id='document-list')

        print(source_ul)
        print(dest_ul)
        # Copy the contents of the source <ul> to the destination <ul>
        if dest_ul and source_ul:
            dest_ul.extend(source_ul.contents)