Skip to content

Commit

Permalink
Updates sort order of the output table
Browse files Browse the repository at this point in the history
  • Loading branch information
catusf authored Feb 3, 2025
1 parent 12210d4 commit 9addd02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/dict_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ def generate_markdown_table(data, files_status, files_status_details, extensions
"""Generate a markdown table from the data."""
print(f"Generating report for {len(data)} dictionaries for {extensions}")

# Sort the data by "Source" then by "Name"
data = sorted(data, key=lambda x: (x["Source"], x["Name"]))

types = [SUPPORTED_EXTENSIONS[ext]["name"] for ext in extensions]
header = "| Number | Name | " # " Description | Source | Target | Owner/Editor | Definitions | " + " | ".join(types)]
seperator = "| --- | --- | " # " --- | --- | --- | --- | --- |" + " --- |" * len(extensions)]
Expand Down

0 comments on commit 9addd02

Please sign in to comment.