Initial commit
This commit is contained in:
parent
2e395a0cb5
commit
ba48fc69b2
31
generate_index.py
Normal file
31
generate_index.py
Normal 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
6
index.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"mydoor": {
|
||||
"description": "A fun door game",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
}
|
9
mydoor/bbsbuild.json
Normal file
9
mydoor/bbsbuild.json
Normal 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"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user