Skip to content

Commit

Permalink
docs: Use mkdocs-typer to generated documentation for CLI scripts
Browse files Browse the repository at this point in the history
Note that the example from mkdocs-typer README no longer works
because of changes in how typer itself works.
  • Loading branch information
jnareb committed Dec 14, 2024
1 parent a3984bd commit 5d36b92
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# CLI Reference

This page provides documentation for PatchScope command line tools.


[//]: # (see https://github.com/bruce-szalwinski/mkdocs-typer/issues/18)

::: mkdocs-typer
:module: diffannotator.generate_patches
:command: app
:prog_name: diff-generate

::: mkdocs-typer
:module: diffannotator.annotate
:command: app
:prog_name: diff-annotate

::: mkdocs-typer
:module: diffannotator.gather_data
:command: app
:prog_name: diff-gather-stats
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ nav:
#- contributing: contributing.md
#- authors: authors.md
#- history: history.md
- CLI: cli.md
- API: reference/
- schema: schema.md
- examples: examples.md
Expand Down Expand Up @@ -84,6 +85,7 @@ markdown_extensions:
permalink: true
slugify: !!python/name:pymdownx.slugs.uslugify
- meta
- mkdocs-typer # generate documentation for Typer command line applications
plugins:
- include-markdown # including (embedding) Markdown files, by default within {% and %}
- search: # adds a search bar to the header; powered by lunr.js
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ doc = [
"mkdocs-gen-files~=0.5.0",
"mkdocs-literate-nav~=0.6.1",
"mkdocs-section-index~=0.3.9",
"mkdocs-typer~=0.0.3",
"mkdocs-material~=9.5.48",
#"mike~=1.1.2",
#"setuptools~=68.0",
Expand Down

0 comments on commit 5d36b92

Please sign in to comment.