Fixed again

This commit is contained in:
vanten-s 2023-11-21 14:01:39 +01:00
parent a243c30446
commit 50a9332cb8
Signed by: vanten-s
GPG key ID: DE3060396884D3F2

10
main.py
View file

@ -15,16 +15,6 @@ def article_list():
article_paths = (pathlib.Path.cwd() / "feed_articles").glob("[0-9]*") article_paths = (pathlib.Path.cwd() / "feed_articles").glob("[0-9]*")
article_paths_sorted = sorted(article_paths, key=lambda x: x.name, reverse=True) article_paths_sorted = sorted(article_paths, key=lambda x: x.name, reverse=True)
metadatas = [feed_generator.convert_markdown_to_html(path)[1] for path in article_paths_sorted]
elements = ['<li><a href="articles.html?{guid}">{title} ({guid})</a></li>'.format(title=metadata["title"][0], guid=metadata["guid"][0]) for metadata in metadatas]
return articles_base_html.format(elements="\n".join(elements))
def article_list_working():
article_paths = (pathlib.Path.cwd() / "feed_articles").glob("[0-9]*")
article_paths_sorted = sorted(article_paths, key=lambda x: x.name, reverse=True)
metadatas = [(feed_generator.convert_markdown_to_html(path)[1], path.parts[-1]) for path in article_paths_sorted] metadatas = [(feed_generator.convert_markdown_to_html(path)[1], path.parts[-1]) for path in article_paths_sorted]
print(metadatas) print(metadatas)