From f9a612db4af04a4cf339db3d7f9463c9be29a658 Mon Sep 17 00:00:00 2001
From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com>
Date: Thu, 2 Apr 2026 15:39:34 +0200
Subject: [PATCH] refactor: simplify readme contributor section to avatars only
---
README.md | 6 ++---
scripts/generate_readme.py | 51 +++-----------------------------------
2 files changed, 6 insertions(+), 51 deletions(-)
diff --git a/README.md b/README.md
index a38039cd..8984aa7e 100644
--- a/README.md
+++ b/README.md
@@ -118,8 +118,8 @@ To keep packs accurate, each file is checked against the emulator's source code.
## Contributors
-
RomM [#37](https://github.com/Abdess/retrobios/pull/37)
-
RetroDECK [#36](https://github.com/Abdess/retrobios/pull/36)
+
+
## Contributing
@@ -130,4 +130,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
This repository provides BIOS files for personal backup and archival purposes.
-*Auto-generated on 2026-04-02T13:28:54Z*
+*Auto-generated on 2026-04-02T13:38:26Z*
diff --git a/scripts/generate_readme.py b/scripts/generate_readme.py
index 142a9e7a..36bf576f 100644
--- a/scripts/generate_readme.py
+++ b/scripts/generate_readme.py
@@ -93,20 +93,6 @@ def fetch_contributors() -> list[dict]:
return []
-def _build_contributor_map(registry: dict) -> dict[str, list[dict]]:
- """Map GitHub username to list of {platform, contribution, pr}."""
- result: dict[str, list[dict]] = {}
- for platform_name, entry in registry.items():
- for c in entry.get("contributed_by", []):
- username = c["username"]
- result.setdefault(username, []).append({
- "platform": platform_name,
- "contribution": c.get("contribution", ""),
- "pr": c.get("pr"),
- })
- return result
-
-
def generate_readme(db: dict, platforms_dir: str) -> str:
total_files = db.get("total_files", 0)
total_size = db.get("total_size", 0)
@@ -115,13 +101,6 @@ def generate_readme(db: dict, platforms_dir: str) -> str:
platform_names = list_registered_platforms(platforms_dir, include_archived=True)
- registry_path = Path(platforms_dir) / "_registry.yml"
- registry = {}
- if registry_path.exists():
- import yaml
- with open(registry_path) as f:
- registry = (yaml.safe_load(f) or {}).get("platforms", {})
-
from common import load_data_dir_registry
from cross_reference import _build_supplemental_index
@@ -353,43 +332,19 @@ def generate_readme(db: dict, platforms_dir: str) -> str:
contributors = fetch_contributors()
if contributors:
- contributor_map = _build_contributor_map(registry)
-
lines.extend(
[
"## Contributors",
"",
]
)
-
- platform_display: dict[str, str] = {}
- for name, cov in coverages.items():
- platform_display[name] = cov["platform"]
-
for c in contributors:
login = c["login"]
avatar = c.get("avatar_url", "")
url = c.get("html_url", f"https://github.com/{login}")
-
- contributions = contributor_map.get(login, [])
- if contributions:
- parts = []
- for contrib in contributions:
- display = platform_display.get(contrib["platform"], contrib["platform"])
- pr = contrib.get("pr")
- label = display
- if pr:
- label += f" [#{pr}](https://github.com/Abdess/retrobios/pull/{pr})"
- parts.append(label)
- desc = ", ".join(parts)
- else:
- desc = ""
-
- line = f'
'
- if desc:
- line += f" {desc}"
- lines.append(line)
-
+ lines.append(
+ f'
'
+ )
lines.append("")
lines.extend(