feat: publish the corrected platform files

export_native now writes into exports/ by default, and beside each
platform's corrected file a report naming every change, where the run
printed five per kind. A new site page lists each platform with its
original file, a download of the corrected one and every corrected,
filled or withheld value. Each platform page links to its row.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 09:20:02 +02:00
1 parent 71b59eb2a3
commit ca13e6036d
8 files changed
+317 -7

No files matched your search

+21
View File
@@ -64,6 +64,7 @@ from generate_readme import (
release_totals,
)
from provenance_report import build_report, distinct_missing
from siteexports import generate_exports_page, load_export_reports
import release_record
DOCS_DIR = "docs"
@@ -1250,6 +1251,7 @@ def _page_description(markdown: str, relative: Path, title: str) -> str:
"data.md": "Versioned RetroBIOS JSON API, CSV exports, SQLite snapshot, schemas, checksums and data interpretation guidance.",
"cross-reference.md": "Cross-reference from retrogaming platforms to emulator cores, systems, upstream projects and profiled firmware files.",
"gaps.md": "Current RetroBIOS verification gaps, platform-to-emulator divergences, missing files and documented source limitations.",
"exports.md": "Each platform's own BIOS list (System.dat, batocera-systems, es_bios.xml and the rest) rewritten with the hashes and files the emulator source code proves.",
"provenance.md": "Hash-based comparison of RetroBIOS metadata with No-Intro, Redump and TOSEC catalog snapshots.",
"which-pack.md": "One-line automatic RetroBIOS installation and platform-specific pack destinations, with verification and release caveats.",
}
@@ -1800,6 +1802,10 @@ def _render_platform_systems(
return lines
# Platforms with a corrected file published by export_native.py.
_EXPORTED: set[str] = set()
def generate_platform_page(
name: str,
cov: dict,
@@ -1891,6 +1897,8 @@ def generate_platform_page(
)
note = " (a branch: the revision read is not recorded)" if moving else ""
lines.append(f"| Transcribed from | <{transcribed}>{note} |")
if name in _EXPORTED:
lines.append(f"| Corrected file | [Download it and see what changed](../exports.md#{name}) |")
contrib_list = (registry or {}).get(name, {}).get("contributed_by", [])
if contrib_list:
for cb in contrib_list:
@@ -4639,6 +4647,7 @@ def generate_mkdocs_nav(
{"Cross-reference": "cross-reference.md"},
{"Gap analysis": "gaps.md"},
{"Dump provenance": "provenance.md"},
{"Corrected platform files": "exports.md"},
{"Data & API": "data.md"},
{"Wiki": wiki_nav},
{"Contributing": "contributing.md"},
@@ -4791,6 +4800,9 @@ def _generate(args: argparse.Namespace) -> None:
_build_system_page_map_from_data(manufacturers, coverages, db, profiles)
print(f" {len(_system_page_map)} system IDs mapped to pages")
export_reports = load_export_reports()
_EXPORTED.update(report["platform"] for report in export_reports)
print("Generating platform pages...")
write_if_changed(
str(docs / "platforms" / "index.md"),
@@ -4876,6 +4888,15 @@ def _generate(args: argparse.Namespace) -> None:
),
)
print("Generating corrected platform files page...")
write_if_changed(
str(docs / "exports.md"),
generate_exports_page(
export_reports,
{name: cov["platform"] for name, cov in coverages.items()},
),
)
print("Generating dump provenance page...")
provenance_report = build_report(db, load_provenance_snapshots())
write_if_changed(