Initial commit

This commit is contained in:
MeaTLoTioN 2025-04-09 16:06:52 +01:00
parent 2e395a0cb5
commit ba48fc69b2
3 changed files with 46 additions and 0 deletions

31
generate_index.py Normal file
View File

@ -0,0 +1,31 @@
import os
import json
from pathlib import Path
REPO_ROOT = Path(__file__).parent # run this from your repo root
def find_packages():
index = {}
for item in REPO_ROOT.iterdir():
if item.is_dir():
metadata_path = item / "bbsbuild.json"
if metadata_path.exists():
with open(metadata_path) as f:
try:
meta = json.load(f)
index[meta["name"]] = {
"description": meta.get("description", ""),
"version": meta.get("version", "unknown")
}
except Exception as e:
print(f"Error parsing {metadata_path}: {e}")
return index
def main():
index = find_packages()
with open(REPO_ROOT / "index.json", "w") as f:
json.dump(index, f, indent=2)
print("index.json generated successfully.")
if __name__ == "__main__":
main()

6
index.json Normal file
View File

@ -0,0 +1,6 @@
{
"mydoor": {
"description": "A fun door game",
"version": "1.0.0"
}
}

9
mydoor/bbsbuild.json Normal file
View File

@ -0,0 +1,9 @@
{
"name": "mydoor",
"version": "1.0.0",
"maintainer": "MeaTLoTioN",
"source": "https://erb.pw/zips/mydoor-1.0.0.tar.gz",
"install": "./install.sh",
"entrypoint": "mydoor",
"description": "A fun door game"
}