feat: file mame software lists and floppy samples

The -listxml names the software lists each machine and slot card
declares and the floppy drives it can instantiate. --devices now writes
one entry per hash/<list>.xml the release ships under the systems of its
placed machines (111 lists, 666 stay with hash/), and files each floppy
sample under the systems whose drives select its form factor
(floppy.cpp:1428-1473, 1759-1767).

Machines a registered platform declares under one of the profile's
systems seed the walk too: bbcb, cdimono1, cdimono2, dragon32, ep64 and
ep128. Unplaced device sets go from 903 to 861.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 12:24:37 +02:00
1 parent 7ac96f2b39
commit 2d74524d59
9 files changed
+1959 -26

No files matched your search

+22
View File
@@ -713,6 +713,28 @@ def _tree_url(repo: Repo, sha: str) -> str | None:
return f"{repo.api_base}/repos/{repo.slug}/git/trees/{sha}?recursive=1"
def list_directory(
repo: Repo, sha: str, path: str, cache_dir: str, offline: bool = False
) -> list[str] | None:
"""Names of the blobs directly under one directory at one revision.
One request for the directory alone, where the whole tree of a large
repository comes back truncated. None when the forge has no such call
or the directory does not exist there.
"""
if repo.family != "github":
return None
url = f"{repo.api_base}/repos/{repo.slug}/git/trees/{sha}:{path.strip('/')}"
payload = _api(url, cache_dir, offline)
if not isinstance(payload, dict) or payload.get("truncated"):
return None
return sorted(
entry["path"]
for entry in payload.get("tree") or []
if isinstance(entry, dict) and entry.get("type") == "blob" and entry.get("path")
)
TREE_PAGE_SIZE = 100
MAX_TREE_PAGES = 50