Spaces:
Sleeping
Sleeping
Update TLDR.py
Browse files51 unmodified lines5253545555565758596061616263647 unmodified lines727374757576777813 unmodified lines929394959551 unmodified lines category_content = [] category_title = f"{buttons_to_add[i]}" anchor_id = category_title.lower().replace(" ", "-") # Generate anchor ID from the title table_of_contents.append(f"- [{category_title}](#{anchor_id}{{.anchor}})") # Add the anchor class to the link table_of_contents.append(f"- [{category_title}](#{anchor_id})")
for paper in paper_list[i]:
# Create the HTML content for both links with line breaks html_content = ( f'<a class="anchor" href="#{anchor_id}">{paper.entry_id}</a>' 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 lines category_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 title pn.pane.HTML(f'<a id="{anchor_id}">{category_title}</a>'), # Create anchor without href for the category title pn.layout.Spacer(height=20), *category_content, pn.layout.Spacer(height=10),13 unmodified lines else: main_tldr.append(pn.pane.Markdown("# Please select some tags!"))
return main_tldr return main_tldrTLDR.py+4-4