Spaces:
Sleeping
Sleeping
Update TLDR.py
Browse files51 unmodified lines525354555657585960616263647 unmodified lines7273747576777813 unmodified lines9293949551 unmodified linescategory_content = []category_title = f"{buttons_to_add[i]}"anchor_id = category_title.lower().replace(" ", "-") # Generate anchor ID from the titletable_of_contents.append(f"- [{category_title}](#{anchor_id}{{.anchor}})") # Add the anchor class to the linkfor paper in paper_list[i]:# Create the HTML content for both links with line breakshtml_content = (f'<a class="anchor" href="#{anchor_id}">{paper.entry_id}</a>'f' - <a href="{paper.pdf_url}" target="_blank">PDF</a>'f' - {(paper.published).strftime("%d/%m/%Y %H:%M:%S")}')7 unmodified linescategory_content.append(paper_content)category_column = pn.Column(pn.pane.Markdown(f"## [{category_title}](#{anchor_id}{{.anchor}})"), # Add Markdown link with anchor ID to the category titlepn.layout.Spacer(height=20),*category_content,pn.layout.Spacer(height=10),13 unmodified lineselse:main_tldr.append(pn.pane.Markdown("# Please select some tags!"))return main_tldr51 unmodified lines525354555657585960616263647 unmodified lines7273747576777813 unmodified lines9293949551 unmodified linescategory_content = []category_title = f"{buttons_to_add[i]}"anchor_id = category_title.lower().replace(" ", "-") # Generate anchor ID from the titletable_of_contents.append(f"- [{category_title}](#{anchor_id})")for paper in paper_list[i]:# Create the HTML content for both links with line breakshtml_content = (f'<a href="{paper.entry_id}" target="_blank">{paper.entry_id}</a>'f' - <a href="{paper.pdf_url}" target="_blank">PDF</a>'f' - {(paper.published).strftime("%d/%m/%Y %H:%M:%S")}')7 unmodified linescategory_content.append(paper_content)category_column = pn.Column(pn.pane.HTML(f'<a id="{anchor_id}">{category_title}</a>'), # Create anchor without href for the category titlepn.layout.Spacer(height=20),*category_content,pn.layout.Spacer(height=10),13 unmodified lineselse:main_tldr.append(pn.pane.Markdown("# Please select some tags!"))return main_tldr
TLDR.py+4-4