Add a mkdocs extension to generate the --help output (#720)

* Add a mkdocs extension to generate the --help output

* Add the correct setuptools syntax for relative requirements

* docs: use macro plugin instead

* docs: remove indirection in docs

Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
Joe Rickerby
2021-06-22 12:18:22 +00:00
committed by GitHub
co-authored by Henry Schreiner
parent 5db1cf898e
commit b6a862a3ff
5 changed files with 21 additions and 51 deletions
+13
View File
@@ -0,0 +1,13 @@
import subprocess
from typing import Any
# Requires Python 3.7+
def define_env(env: Any) -> None:
"Hook function for mkdocs-macros"
@env.macro
def subprocess_run(*args: str) -> str:
"Run a subprocess and return the stdout"
return subprocess.run(args, check=True, capture_output=True, text=True).stdout