docs: concatenate licenses

This commit is contained in:
aclist committed 2026-06-03 15:12:48 +09:00
1 parent bddf792280
commit f4b653e9dd
3 files changed
+17 -11

No files matched your search

+5 -3
View File
@@ -1,14 +1,16 @@
from pathlib import Path
def concat_license() -> str:
combined = ""
root = Path(__file__).resolve().parents[1]
licenses = root.joinpath("licenses")
combined = ""
self_license = root.joinpath("LICENSE")
combined += "--- DZGUI application license ---\n\n"
combined += self_license.read_text()
for _dir in licenses.iterdir():
docs = _dir.glob("*.md")
docs = _dir.glob("*")
doc = list(docs)[0]
header = f"\n--- The verbatim license for bundled dependency '{_dir.name}' follows ---\n\n"
combined += header
combined += doc.read_text()
return combined