Spaces:
Sleeping
Sleeping
Update TLDR.py
Browse files45 unmodified lines46474849505126 unmodified lines7879808182838445 unmodified linesdef update_mainTLDR(buttons_to_add, paper_list):main_tldr = []if buttons_to_add:for i in range(len(buttons_to_add)):category_content = []26 unmodified linesmain_tldr.append(category_column)else:main_tldr.append(pn.pane.Markdown("# Please select some tags!"))return main_tldr45 unmodified lines464748495051525326 unmodified lines8081828384858687888990919293949545 unmodified linesdef update_mainTLDR(buttons_to_add, paper_list):main_tldr = []table_of_contents = [] # List to store the table of contents entriesif buttons_to_add:for i in range(len(buttons_to_add)):category_content = []26 unmodified linesmain_tldr.append(category_column)# Add entry to the table of contentstable_of_contents.append(f"- [{buttons_to_add[i]}](#{buttons_to_add[i]})")else:main_tldr.append(pn.pane.Markdown("# Please select some tags!"))# Create the table of contents Markdown texttoc_text = "\n".join(table_of_contents)# Prepend the table of contents to the main contentmain_tldr.insert(0, pn.pane.Markdown(f"## Table of Contents\n{toc_text}\n"))return main_tldr
TLDR.py+11