Migrate all repos into monorepo context folders
Bahn: aisupport, Analyse-O2C-C2S, awesome-bahn-mcp-servers, beam-mcp,
Confluence_Bot, db-planet-mcp-server, O2C-Harness, project-audit,
Projekt-KIQ-HP, teamlandkarte-mcp
Dhive: Jury-Voting
Privat: CV, NoteGraph (NOTE: NoteGraph needs complete redo after consolidation)
Shared: AI-Orchestrator, OrgMyLife, power_skills_and_more
Shared/references: symphony (read-only)
Bahn repos remain available as independent remotes - this monorepo
pulls them in via subtree, the originals are untouched.
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate README.md from index.json."""
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
DIR = Path(__file__).parent
|
||||
data = json.loads((DIR / "index.json").read_text(encoding="utf-8"))
|
||||
|
||||
|
||||
def sort_key(s):
|
||||
"""OFFICIAL first, then BETA, then by stars desc, then name asc."""
|
||||
return (
|
||||
0 if s.get("official") else 1,
|
||||
0 if s.get("beta") else 1,
|
||||
-s.get("stars", 0),
|
||||
s["name"]
|
||||
)
|
||||
|
||||
|
||||
lines = []
|
||||
w = lines.append
|
||||
|
||||
w((DIR / "header.md").read_text(encoding="utf-8").rstrip())
|
||||
|
||||
# --- TOC ---
|
||||
categories = sorted(set(s["category"] for s in data["servers"]))
|
||||
w("")
|
||||
for cat in categories:
|
||||
anchor = cat.lower().replace(" ", "-").replace("(", "").replace(")", "")
|
||||
w(f"- [{cat}](#{anchor})")
|
||||
|
||||
for cat in categories:
|
||||
servers = sorted((s for s in data["servers"] if s["category"] == cat), key=sort_key)
|
||||
|
||||
w("")
|
||||
w(f"## {cat}")
|
||||
w("")
|
||||
|
||||
for s in servers:
|
||||
badge = ""
|
||||
if s.get("official"):
|
||||
badge = " "
|
||||
elif s.get("beta"):
|
||||
badge = " "
|
||||
note = s.get("note", "")
|
||||
|
||||
w(f'- [{s["name"]}]({s["url"]}){badge} — {s["description"]}')
|
||||
|
||||
details = [f"⭐ {s['stars']}"]
|
||||
c = s.get("contributors")
|
||||
if c:
|
||||
details.append(f"{c} Contributors")
|
||||
if note:
|
||||
details.append(note)
|
||||
|
||||
w(f' {" · ".join(details)}')
|
||||
|
||||
# --- Footer ---
|
||||
w("")
|
||||
w((DIR / "footer.md").read_text(encoding="utf-8").rstrip())
|
||||
|
||||
(DIR / "README.md").write_text("\n".join(lines) + "\n", encoding="utf-8")
|
||||
print("README.md generated from index.json")
|
||||
Reference in New Issue
Block a user