feat: name the file each platform page transcribes

This commit is contained in:
Abdessamad Derraz committed 2026-10-19 04:35:08 +02:00
1 parent 2abef61acd
commit 49e7119b1c
2 files changed
+29

No files matched your search

+9
View File
@@ -1840,6 +1840,15 @@ def generate_platform_page(
lines.append(f"| BIOS path | `{base_dest}/` |")
if homepage:
lines.append(f"| Homepage | [{homepage}]({homepage}) |")
transcribed = str(config.get("source") or "")
if transcribed:
# The file every declaration on this page was read from: without it
# a hash could not be traced to the revision that states it.
moving = re.search(r"/(?:master|main|db)(?:/|$)|refs/heads/", transcribed) or (
re.fullmatch(r"https://(?:github|gitlab)\.com/[^/]+/[^/]+/?", transcribed)
)
note = " (a branch: the revision read is not recorded)" if moving else ""
lines.append(f"| Transcribed from | <{transcribed}>{note} |")
contrib_list = (registry or {}).get(name, {}).get("contributed_by", [])
if contrib_list:
for cb in contrib_list: