From 00ed3fb3527cad58362f7169b15cfbc34e0434c4 Mon Sep 17 00:00:00 2001 From: Weiqi Gao Date: Sun, 18 Feb 2024 18:08:04 +0800 Subject: [PATCH] Sort file by file extension --- gh-actions-generate-toc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gh-actions-generate-toc.py b/gh-actions-generate-toc.py index d6daad2..767af5e 100644 --- a/gh-actions-generate-toc.py +++ b/gh-actions-generate-toc.py @@ -49,7 +49,7 @@ markdown += f"## {catagory}\n\n" for name in sorted(instruments[catagory].keys()): markdown += f"- [{name}]({instrument_urls[catagory][name]})\n" - for asset in sorted(instruments[catagory][name].keys()): + for asset in sorted(instruments[catagory][name].keys(), key=lambda x: x.rsplit(".", 1)[1]): markdown += f" - [{asset}]({instruments[catagory][name][asset]})\n" markdown += "\n"