diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 24a148d..b12f6a7 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -22,7 +22,9 @@ jobs:
run: pdm install
- name: Build Docs
- run: pdm run make docs
+ run: |
+ make svgs
+ make docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
diff --git a/Makefile b/Makefile
index 2a24ac9..c1c570f 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,9 @@ dev-install:
docs: docs/index.md docs/viv.py ## build docs
pdm run mkdocs build
+svgs: ## build svgs for docs
+ pdm run python ./scripts/generate-svgs.py
+
docs/viv.py: src/viv/viv.py
cp $< $@
diff --git a/docs/svgs/viv-cache-help.svg b/docs/svgs/viv-cache-help.svg
deleted file mode 100644
index ec3d67a..0000000
--- a/docs/svgs/viv-cache-help.svg
+++ /dev/null
@@ -1,104 +0,0 @@
-
diff --git a/docs/svgs/viv-cache-info-help.svg b/docs/svgs/viv-cache-info-help.svg
deleted file mode 100644
index 3a91bc9..0000000
--- a/docs/svgs/viv-cache-info-help.svg
+++ /dev/null
@@ -1,104 +0,0 @@
-
diff --git a/docs/svgs/viv-cache-remove-help.svg b/docs/svgs/viv-cache-remove-help.svg
deleted file mode 100644
index 58a80f8..0000000
--- a/docs/svgs/viv-cache-remove-help.svg
+++ /dev/null
@@ -1,96 +0,0 @@
-
diff --git a/docs/svgs/viv-exe-help.svg b/docs/svgs/viv-exe-help.svg
deleted file mode 100644
index cbf6eaf..0000000
--- a/docs/svgs/viv-exe-help.svg
+++ /dev/null
@@ -1,116 +0,0 @@
-
diff --git a/docs/svgs/viv-freeze-help.svg b/docs/svgs/viv-freeze-help.svg
deleted file mode 100644
index f15f337..0000000
--- a/docs/svgs/viv-freeze-help.svg
+++ /dev/null
@@ -1,113 +0,0 @@
-
diff --git a/docs/svgs/viv-help.svg b/docs/svgs/viv-help.svg
deleted file mode 100644
index 22ed303..0000000
--- a/docs/svgs/viv-help.svg
+++ /dev/null
@@ -1,138 +0,0 @@
-
diff --git a/docs/svgs/viv-list-help.svg b/docs/svgs/viv-list-help.svg
deleted file mode 100644
index 57eb106..0000000
--- a/docs/svgs/viv-list-help.svg
+++ /dev/null
@@ -1,133 +0,0 @@
-
diff --git a/docs/svgs/viv-manage-help.svg b/docs/svgs/viv-manage-help.svg
deleted file mode 100644
index 254d133..0000000
--- a/docs/svgs/viv-manage-help.svg
+++ /dev/null
@@ -1,112 +0,0 @@
-
diff --git a/docs/svgs/viv-manage-install-help.svg b/docs/svgs/viv-manage-install-help.svg
deleted file mode 100644
index eedcf58..0000000
--- a/docs/svgs/viv-manage-install-help.svg
+++ /dev/null
@@ -1,101 +0,0 @@
-
diff --git a/docs/svgs/viv-manage-purge-help.svg b/docs/svgs/viv-manage-purge-help.svg
deleted file mode 100644
index c9fc5f7..0000000
--- a/docs/svgs/viv-manage-purge-help.svg
+++ /dev/null
@@ -1,101 +0,0 @@
-
diff --git a/docs/svgs/viv-manage-show-help.svg b/docs/svgs/viv-manage-show-help.svg
deleted file mode 100644
index a92163f..0000000
--- a/docs/svgs/viv-manage-show-help.svg
+++ /dev/null
@@ -1,88 +0,0 @@
-
diff --git a/docs/svgs/viv-manage-update-help.svg b/docs/svgs/viv-manage-update-help.svg
deleted file mode 100644
index 6f1dfb0..0000000
--- a/docs/svgs/viv-manage-update-help.svg
+++ /dev/null
@@ -1,101 +0,0 @@
-
diff --git a/docs/svgs/viv-run-help.svg b/docs/svgs/viv-run-help.svg
deleted file mode 100644
index f14c3ae..0000000
--- a/docs/svgs/viv-run-help.svg
+++ /dev/null
@@ -1,137 +0,0 @@
-
diff --git a/docs/svgs/viv-shim-help.svg b/docs/svgs/viv-shim-help.svg
deleted file mode 100644
index 0fc1117..0000000
--- a/docs/svgs/viv-shim-help.svg
+++ /dev/null
@@ -1,145 +0,0 @@
-
diff --git a/scripts/generate-svgs.py b/scripts/generate-svgs.py
index d6306c7..5f33d4a 100755
--- a/scripts/generate-svgs.py
+++ b/scripts/generate-svgs.py
@@ -39,23 +39,22 @@ def yartsu(output: Path, args: Tuple[str, str] | str) -> None:
if isinstance(args, str):
args = (args,)
cmd = [
- VIV,
- "run",
- "-k",
- "yartsu",
- "--",
- "-w",
- "70",
- "-o",
- output,
- "--",
"viv",
*args,
"--help",
+ "|",
+ "yartsu",
+ "-w",
+ "70",
+ "-o",
+ str(output),
]
- run(cmd)
+ run(" ".join(cmd), shell=True)
+if not SAVE_PATH.is_dir():
+ SAVE_PATH.mkdir(exist_ok=True, parents=True)
+
yartsu(SAVE_PATH / "viv-help.svg", "")
for cmd, subcmds in cmds.items():
p = SAVE_PATH / f"viv-{cmd}-help.svg"