From 9755c16028ef545c245c621bb0afd334bc71b20e Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Thu, 22 Oct 2020 13:00:58 +0100 Subject: [PATCH] Avoid using PyYAML in `gen_mkdocs_pages` script --- .github/workflows/release.yaml | 1 - docs/index.md | 1 + gen_mkdocs_pages.py | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 docs/index.md diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 02f2e5c..6e35fbf 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -54,7 +54,6 @@ jobs: mkdir -p docs/reference/ bin/github.com/netsoc/cli-linux-amd64 docs -t markdown -o docs/reference/ - pip3 install pyyaml ./gen_mkdocs_pages.py docs/reference/ > docs/reference/.pages - name: Commit reference docs diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..d449e1a --- /dev/null +++ b/docs/index.md @@ -0,0 +1 @@ +# Netsoc CLI diff --git a/gen_mkdocs_pages.py b/gen_mkdocs_pages.py index e423267..d316243 100755 --- a/gen_mkdocs_pages.py +++ b/gen_mkdocs_pages.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import os import sys -import yaml +import json if len(sys.argv) != 2: print(f'usage: {sys.argv[0]} ', file=sys.stderr) @@ -18,4 +18,4 @@ nav = list(sorted(nav, key=lambda i: next(iter(i)))) -yaml.dump({'nav': nav}, sys.stdout, indent=2) +json.dump({'nav': nav}, sys.stdout, indent=2)