From 7bb2eda80ec77986608d21d38912d1e498e29c85 Mon Sep 17 00:00:00 2001 From: "Yi Yang @ Aquamarine" Date: Tue, 3 Sep 2024 18:18:17 +0800 Subject: [PATCH] (station) Sort by station-id in documentation --- station/lib/docgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/station/lib/docgen.py b/station/lib/docgen.py index 89b8e7c7..7712e33d 100644 --- a/station/lib/docgen.py +++ b/station/lib/docgen.py @@ -52,7 +52,7 @@ def gen_docs(string_manager, metastations): cat_name = cat_name.split("-")[-1].strip() cat_name = remove_control_letters(cat_name) print(f"## {cat_name}", file=f) - for layout in subsections[sub]: + for layout in sorted(subsections[sub], key=lambda x: x.station_id): img = layout.graphics(4, 32, remap=get_1cc_remap(CompanyColour.BLUE)).crop().to_pil_image() if "station_id" in dir(layout): idstr = f"{layout.station_id:04X}"