diff --git a/README.md b/README.md index 0865501..0901404 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,6 @@ A GitHub Actions workflow runs every 6 hours, on every push to `main`, and on de - finds every repo owned by the account with the `sotf-mod` topic and mirrors the zip from its latest release - mirrors the latest RedLoader release -- lists repos with the `sotf-tool` topic under Tools - publishes everything with a `manifest.json` to GitHub Pages The page writes files straight into the game folder using the browser's File System Access API. @@ -26,7 +25,7 @@ The page writes files straight into the game folder using the browser's File Sys ## Setup 1. Settings, Pages, Source: **GitHub Actions**. -2. Add the `sotf-mod` topic to each mod repo and `sotf-tool` to each tool repo. +2. Add the `sotf-mod` topic to each mod repo. 3. Actions, **Build and deploy**, **Run workflow**. ## Mod release requirements diff --git a/build.py b/build.py index 0c5574c..02854ef 100644 --- a/build.py +++ b/build.py @@ -13,7 +13,6 @@ OWNER = os.environ.get("OWNER", "JustinOros") TOKEN = os.environ.get("GITHUB_TOKEN", "") REDLOADER_REPO = "ToniMacaroni/RedLoader" MOD_TOPIC = "sotf-mod" -TOOL_TOPIC = "sotf-tool" ROOT = Path(__file__).resolve().parent SITE_SRC = ROOT / "site" OUT = ROOT / "_site" @@ -188,47 +187,27 @@ def build_redloader(): } -def build_tool(repo): - if repo.get("homepage"): - url = repo["homepage"] - elif repo.get("has_pages"): - url = f"https://{OWNER.lower()}.github.io/{repo['name']}/" - else: - url = repo["html_url"] - print(f"tool {repo['name']}") - return { - "name": repo["name"], - "description": repo.get("description") or "", - "url": url, - "repo": repo["html_url"], - } - - def main(): if OUT.exists(): shutil.rmtree(OUT) shutil.copytree(SITE_SRC, OUT) mods = [] - tools = [] for repo in sorted(list_repos(), key=lambda r: r["name"].lower()): topics = repo.get("topics") or [] if MOD_TOPIC in topics: entry = build_mod(repo) if entry: mods.append(entry) - elif TOOL_TOPIC in topics: - tools.append(build_tool(repo)) redloader = build_redloader() manifest = { "generated": datetime.now(timezone.utc).isoformat(timespec="seconds"), "owner": OWNER, "redloader": redloader, "mods": mods, - "tools": tools, } (OUT / "manifest.json").write_text(json.dumps(manifest, indent=2), encoding="utf-8") (OUT / ".nojekyll").write_text("", encoding="utf-8") - print(f"done: {len(mods)} mods, {len(tools)} tools") + print(f"done: {len(mods)} mods") if __name__ == "__main__": diff --git a/site/app.js b/site/app.js index 5ad0ba3..c962a37 100644 --- a/site/app.js +++ b/site/app.js @@ -462,28 +462,6 @@ function renderMods() { node.replaceChildren(head, ...notes, el("ul", { class: "rows" }, mods.map(modRow))); } -function renderTools() { - const node = $("tools"); - const tools = state.manifest.tools || []; - node.hidden = !tools.length; - if (!tools.length) return; - node.classList.add("tools"); - node.replaceChildren( - el("div", { class: "block-head" }, el("h2", { id: "tools-title" }, "Tools")), - el("ul", { class: "rows" }, - tools.map((tool) => - el("li", { class: "row" }, - el("div", {}, - el("h3", {}, el("a", { href: tool.url, target: "_blank", rel: "noopener" }, tool.name)), - tool.description ? el("p", { class: "desc" }, tool.description) : null, - el("p", { class: "meta" }, el("a", { href: tool.repo, target: "_blank", rel: "noopener" }, "Source")), - ), - ), - ), - ), - ); -} - function renderFooter() { const { owner, generated, redloader } = state.manifest; const updated = generated ? new Date(generated).toLocaleString() : "unknown"; @@ -502,7 +480,6 @@ function render() { renderFolder(); renderRedloader(); renderMods(); - renderTools(); renderFooter(); } diff --git a/site/index.html b/site/index.html index f7780b6..25d9a08 100644 --- a/site/index.html +++ b/site/index.html @@ -20,7 +20,6 @@ -
diff --git a/site/style.css b/site/style.css index 0e0a01e..1f72321 100644 --- a/site/style.css +++ b/site/style.css @@ -255,10 +255,6 @@ button:disabled { cursor: not-allowed; } -.tools .row { - grid-template-columns: minmax(0, 1fr); -} - .status { position: sticky; bottom: 0;