pkgs/nixfiles-docs-generate-pkgs-md: Automatically generate package documentation
This commit is contained in:
30
pkgs/nixfiles-docs-generate-pkgs-md/nixfiles-docs-generate-pkgs-md.py
Executable file
30
pkgs/nixfiles-docs-generate-pkgs-md/nixfiles-docs-generate-pkgs-md.py
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
parser = argparse.ArgumentParser(prog="generate-pkgs-docs.py")
|
||||
parser.add_argument("pkgs_json_file", type=Path)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
packages = json.loads(args.pkgs_json_file.read_text())
|
||||
|
||||
print("""---
|
||||
hide:
|
||||
- navigation
|
||||
---
|
||||
|
||||
# Packages
|
||||
|
||||
""")
|
||||
|
||||
for package in packages:
|
||||
print(f"## {package['name']}")
|
||||
print("")
|
||||
print("* Build status: "
|
||||
f"[x86_64-linux](https://hydra.clerie.de/job/nixfiles/nixfiles/packages.x86_64-linux.{package['name']}) | "
|
||||
f"[aarch64-linux](https://hydra.clerie.de/job/nixfiles/nixfiles/packages.aarch64-linux.{package['name']})"
|
||||
)
|
||||
print("")
|
||||
Reference in New Issue
Block a user