Skip to content

Commit 7681618

Browse files
committed
docs: quick fix generation script and update
The generation script updates the command documentation and especially the index, but it always added an extra two newlines which I removed before committing. Get rid of those spare two spaces in the generator script, and re-run it to pick up a recent change in the "yo cache-clean" command description. Signed-off-by: Stephen Brennan <[email protected]>
1 parent 37bd4df commit 7681618

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ test:
5656

5757
.PHONY: docs
5858
docs:
59+
@$(PYTHON) scripts/rebuild_docs.py
5960
@$(PYTHON) -m tox -e docs
61+
@if [ ! -z "$$(git status docs --porcelain)" ]; then \
62+
echo "note: The docs tree is unclean"; \
63+
fi
6064

6165
.PHONY: docs-publish
6266
docs-publish: docs

doc/cmds/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Informative Commands:
8181

8282
Diagnostic Commands:
8383

84-
- :ref:`yo_cache_clean` - Clear Yo's cache -- a good first troubleshooting step.
84+
- :ref:`yo_cache_clean` - Clear Yo's caches -- a good first troubleshooting step.
8585
- :ref:`yo_debug` - Open up a python prompt in the context of a command.
8686
- :ref:`yo_help` - Show help for yo.
8787
- :ref:`yo_version` - Show the version of yo and check for updates.

scripts/rebuild_docs.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
DIRECTIVE_FMT = """.. argparse::
55
:module: yo.main
66
:func: cmd_{stdname}_args
7-
:prog: yo {name}
8-
9-
"""
7+
:prog: yo {name}"""
108

119

1210
def main():
@@ -25,7 +23,9 @@ def main():
2523
# f.write(f".. _{group}::\n\n")
2624
f.write(group + "\n")
2725
f.write("=" * len(group) + "\n\n")
28-
for cmd in group_to_cmd[group]:
26+
for j, cmd in enumerate(group_to_cmd[group]):
27+
if j > 0:
28+
f.write("\n\n")
2929
stdname = cmd.name.translate(trans)
3030
directive = DIRECTIVE_FMT.format(
3131
name=cmd.name,

0 commit comments

Comments
 (0)