mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-18 23:02:33 -05:00
feat: add platform logos to registry and site
This commit is contained in:
@@ -10,6 +10,7 @@ platforms:
|
|||||||
retroarch:
|
retroarch:
|
||||||
config: retroarch.yml
|
config: retroarch.yml
|
||||||
status: active
|
status: active
|
||||||
|
logo: "https://raw.githubusercontent.com/libretro/RetroArch/master/media/retroarch-vector_invader-only.svg"
|
||||||
scraper: libretro
|
scraper: libretro
|
||||||
source_url: "https://raw.githubusercontent.com/libretro/libretro-database/master/dat/System.dat"
|
source_url: "https://raw.githubusercontent.com/libretro/libretro-database/master/dat/System.dat"
|
||||||
source_format: clrmamepro_dat
|
source_format: clrmamepro_dat
|
||||||
@@ -20,6 +21,7 @@ platforms:
|
|||||||
batocera:
|
batocera:
|
||||||
config: batocera.yml
|
config: batocera.yml
|
||||||
status: active
|
status: active
|
||||||
|
logo: "https://raw.githubusercontent.com/batocera-linux/batocera-emulationstation/master/resources/splash_batocera.svg"
|
||||||
scraper: batocera
|
scraper: batocera
|
||||||
source_url: "https://raw.githubusercontent.com/batocera-linux/batocera.linux/master/package/batocera/core/batocera-scripts/scripts/batocera-systems"
|
source_url: "https://raw.githubusercontent.com/batocera-linux/batocera.linux/master/package/batocera/core/batocera-scripts/scripts/batocera-systems"
|
||||||
source_format: python_dict
|
source_format: python_dict
|
||||||
@@ -30,6 +32,7 @@ platforms:
|
|||||||
recalbox:
|
recalbox:
|
||||||
config: recalbox.yml
|
config: recalbox.yml
|
||||||
status: active
|
status: active
|
||||||
|
logo: "https://raw.githubusercontent.com/homarr-labs/dashboard-icons/main/svg/recalbox.svg"
|
||||||
scraper: recalbox
|
scraper: recalbox
|
||||||
source_url: "https://gitlab.com/recalbox/recalbox/-/raw/master/board/recalbox/fsoverlay/recalbox/share_init/system/.emulationstation/es_bios.xml"
|
source_url: "https://gitlab.com/recalbox/recalbox/-/raw/master/board/recalbox/fsoverlay/recalbox/share_init/system/.emulationstation/es_bios.xml"
|
||||||
source_format: xml
|
source_format: xml
|
||||||
@@ -40,6 +43,7 @@ platforms:
|
|||||||
retrobat:
|
retrobat:
|
||||||
config: retrobat.yml
|
config: retrobat.yml
|
||||||
status: active
|
status: active
|
||||||
|
logo: "https://raw.githubusercontent.com/RetroBat-Official/retrobat/main/system/resources/retrobat_logo_notext.png"
|
||||||
scraper: retrobat
|
scraper: retrobat
|
||||||
source_url: "https://raw.githubusercontent.com/RetroBat-Official/emulatorlauncher/master/batocera-systems/Resources/batocera-systems.json"
|
source_url: "https://raw.githubusercontent.com/RetroBat-Official/emulatorlauncher/master/batocera-systems/Resources/batocera-systems.json"
|
||||||
source_format: json
|
source_format: json
|
||||||
@@ -50,6 +54,7 @@ platforms:
|
|||||||
emudeck:
|
emudeck:
|
||||||
config: emudeck.yml
|
config: emudeck.yml
|
||||||
status: active
|
status: active
|
||||||
|
logo: "https://raw.githubusercontent.com/dragoonDorise/EmuDeck/main/icons/EmuDeck.png"
|
||||||
scraper: emudeck
|
scraper: emudeck
|
||||||
source_url: "https://raw.githubusercontent.com/dragoonDorise/EmuDeck/main/functions/checkBIOS.sh"
|
source_url: "https://raw.githubusercontent.com/dragoonDorise/EmuDeck/main/functions/checkBIOS.sh"
|
||||||
source_wiki: "https://raw.githubusercontent.com/EmuDeck/emudeck.github.io/main/docs/tables/"
|
source_wiki: "https://raw.githubusercontent.com/EmuDeck/emudeck.github.io/main/docs/tables/"
|
||||||
@@ -63,6 +68,7 @@ platforms:
|
|||||||
lakka:
|
lakka:
|
||||||
config: lakka.yml
|
config: lakka.yml
|
||||||
status: active
|
status: active
|
||||||
|
logo: "https://raw.githubusercontent.com/libretro/retroarch-assets/master/src/xmb/flatui/lakka.svg"
|
||||||
scraper: libretro
|
scraper: libretro
|
||||||
inherits_from: retroarch
|
inherits_from: retroarch
|
||||||
schedule: weekly
|
schedule: weekly
|
||||||
@@ -70,5 +76,6 @@ platforms:
|
|||||||
retropie:
|
retropie:
|
||||||
config: retropie.yml
|
config: retropie.yml
|
||||||
status: archived # Last release: v4.8 (March 2022) - no update in 4 years
|
status: archived # Last release: v4.8 (March 2022) - no update in 4 years
|
||||||
|
logo: "https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/scriptmodules/system/RetroPie/icon.png"
|
||||||
scraper: null
|
scraper: null
|
||||||
schedule: null
|
schedule: null
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ def _load_emulator_profiles(emulators_dir: str) -> dict[str, dict]:
|
|||||||
# Home page
|
# Home page
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
def generate_home(db: dict, coverages: dict, emulator_count: int) -> str:
|
def generate_home(db: dict, coverages: dict, emulator_count: int,
|
||||||
|
registry: dict | None = None) -> str:
|
||||||
total_files = db.get("total_files", 0)
|
total_files = db.get("total_files", 0)
|
||||||
total_size = db.get("total_size", 0)
|
total_size = db.get("total_size", 0)
|
||||||
ts = _timestamp()
|
ts = _timestamp()
|
||||||
@@ -130,8 +131,10 @@ def generate_home(db: dict, coverages: dict, emulator_count: int) -> str:
|
|||||||
display = cov["platform"]
|
display = cov["platform"]
|
||||||
total = cov["total"]
|
total = cov["total"]
|
||||||
mode = cov["mode"]
|
mode = cov["mode"]
|
||||||
|
logo_url = (registry or {}).get(name, {}).get("logo", "")
|
||||||
|
logo_md = f"{{ width=24 }} " if logo_url else ""
|
||||||
lines.append(
|
lines.append(
|
||||||
f"| {display} | {total} | {mode} | "
|
f"| {logo_md}{display} | {total} | {mode} | "
|
||||||
f"[Download]({RELEASE_URL}) |"
|
f"[Download]({RELEASE_URL}) |"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -186,16 +189,19 @@ def generate_platform_index(coverages: dict) -> str:
|
|||||||
return "\n".join(lines) + "\n"
|
return "\n".join(lines) + "\n"
|
||||||
|
|
||||||
|
|
||||||
def generate_platform_page(name: str, cov: dict) -> str:
|
def generate_platform_page(name: str, cov: dict, registry: dict | None = None) -> str:
|
||||||
config = cov["config"]
|
config = cov["config"]
|
||||||
display = cov["platform"]
|
display = cov["platform"]
|
||||||
mode = cov["mode"]
|
mode = cov["mode"]
|
||||||
pct = _pct(cov["present"], cov["total"])
|
pct = _pct(cov["present"], cov["total"])
|
||||||
|
|
||||||
|
logo_url = (registry or {}).get(name, {}).get("logo", "")
|
||||||
|
logo_md = f"{{ width=48 align=right }}\n\n" if logo_url else ""
|
||||||
|
|
||||||
lines = [
|
lines = [
|
||||||
f"# {display} - {SITE_NAME}",
|
f"# {display} - {SITE_NAME}",
|
||||||
"",
|
"",
|
||||||
f"**Verification mode:** {mode}",
|
logo_md + f"**Verification mode:** {mode}",
|
||||||
f"**Coverage:** {cov['present']}/{cov['total']} ({pct})",
|
f"**Coverage:** {cov['present']}/{cov['total']} ({pct})",
|
||||||
f"**Verified:** {cov['verified']} | **Untested:** {cov['untested']} | **Missing:** {cov['missing']}",
|
f"**Verified:** {cov['verified']} | **Untested:** {cov['untested']} | **Missing:** {cov['missing']}",
|
||||||
"",
|
"",
|
||||||
@@ -708,6 +714,13 @@ def main():
|
|||||||
for d in GENERATED_DIRS:
|
for d in GENERATED_DIRS:
|
||||||
(docs / d).mkdir(parents=True, exist_ok=True)
|
(docs / d).mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
# Load registry for platform metadata (logos, etc.)
|
||||||
|
registry_path = Path(args.platforms_dir) / "_registry.yml"
|
||||||
|
registry = {}
|
||||||
|
if registry_path.exists():
|
||||||
|
with open(registry_path) as f:
|
||||||
|
registry = (yaml.safe_load(f) or {}).get("platforms", {})
|
||||||
|
|
||||||
# Load platform configs
|
# Load platform configs
|
||||||
platform_names = [
|
platform_names = [
|
||||||
p.stem for p in Path(args.platforms_dir).glob("*.yml")
|
p.stem for p in Path(args.platforms_dir).glob("*.yml")
|
||||||
@@ -736,13 +749,13 @@ def main():
|
|||||||
|
|
||||||
# Generate home
|
# Generate home
|
||||||
print("Generating home page...")
|
print("Generating home page...")
|
||||||
(docs / "index.md").write_text(generate_home(db, coverages, unique_count))
|
(docs / "index.md").write_text(generate_home(db, coverages, unique_count, registry))
|
||||||
|
|
||||||
# Generate platform pages
|
# Generate platform pages
|
||||||
print("Generating platform pages...")
|
print("Generating platform pages...")
|
||||||
(docs / "platforms" / "index.md").write_text(generate_platform_index(coverages))
|
(docs / "platforms" / "index.md").write_text(generate_platform_index(coverages))
|
||||||
for name, cov in coverages.items():
|
for name, cov in coverages.items():
|
||||||
(docs / "platforms" / f"{name}.md").write_text(generate_platform_page(name, cov))
|
(docs / "platforms" / f"{name}.md").write_text(generate_platform_page(name, cov, registry))
|
||||||
|
|
||||||
# Generate system pages
|
# Generate system pages
|
||||||
print("Generating system pages...")
|
print("Generating system pages...")
|
||||||
|
|||||||
Reference in New Issue
Block a user