mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
- Add a URL-driven Chinese overlay page rendering item rate tables, tech levels, current research, and Dyson sphere power for streams. - Add the offline GameIcons layer and generate_icons.py, which extracts every item and tech icon from a local DSP install into js/generated/dsp-icons.js. - Reuse the proto extraction in generate_text.py and cover the new page with test_dashboard.js.
21 lines
532 B
Python
21 lines
532 B
Python
#!/usr/bin/env python3
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
SRC = ROOT / "src"
|
|
OUT = ROOT / "livestream-assist.js"
|
|
parts = [
|
|
SRC / "header.js",
|
|
SRC / "format.js",
|
|
SRC / "client.js",
|
|
SRC / "query.js",
|
|
SRC / "text.js",
|
|
SRC / "icons.js",
|
|
SRC / "footer.js",
|
|
]
|
|
text = "".join(path.read_text(encoding="utf-8") for path in parts)
|
|
if not text.endswith("\n"):
|
|
text += "\n"
|
|
OUT.write_text(text, encoding="utf-8", newline="\n")
|
|
print(f"Wrote {OUT} ({OUT.stat().st_size} bytes)")
|