Skip to content

Commit

Permalink
docs: make man pages more standard
Browse files Browse the repository at this point in the history
While our man pages included all relevant documentation parts, they were
pretty non-standard (e.g. non standard section names, no synopsis).

This patch switches the sphinx-argparser directive into manpage mode
(for manpages only) and adds the module description into the DESCRIPTION
field. By that, the manpages now follow the recommended scheme.

Signed-off-by: Felix Moessbauer <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
fmoessbauer authored and jan-kiszka committed Apr 25, 2024
1 parent 11c7af3 commit 3f46848
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 67 deletions.
10 changes: 9 additions & 1 deletion docs/_man/kas-plugin-build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
kas build plugin
================

.. include:: ../userguide/plugins/build.inc
.. argparse::
:module: kas.kas
:func: kas_get_argparser
:prog: kas
:path: build
:manpage:

.. automodule:: kas.plugins.build
:noindex:

.. include:: _kas-man-footer.inc
10 changes: 9 additions & 1 deletion docs/_man/kas-plugin-checkout.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
kas checkout plugin
===================

.. include:: ../userguide/plugins/checkout.inc
.. argparse::
:module: kas.kas
:func: kas_get_argparser
:prog: kas
:path: checkout
:manpage:

.. automodule:: kas.plugins.checkout
:noindex:

.. include:: _kas-man-footer.inc
12 changes: 10 additions & 2 deletions docs/_man/kas-plugin-dump.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
kas dump plugin
===============

.. include:: ../userguide/plugins/dump.inc
.. argparse::
:module: kas.kas
:func: kas_get_argparser
:prog: kas
:path: dump
:manpage:

.. automodule:: kas.plugins.dump
:noindex:

SEE ALSO
~~~~~~~~
--------

:manpage:`kas-project-config(1)`,
:manpage:`kas-checkout(1)`,
Expand Down
10 changes: 9 additions & 1 deletion docs/_man/kas-plugin-for-all-repos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
kas for-all-repos plugin
========================

.. include:: ../userguide/plugins/for-all-repos.inc
.. argparse::
:module: kas.kas
:func: kas_get_argparser
:prog: kas
:path: for-all-repos
:manpage:

.. automodule:: kas.plugins.for_all_repos
:noindex:

.. include:: _kas-man-footer.inc
10 changes: 9 additions & 1 deletion docs/_man/kas-plugin-menu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
kas menu plugin
===============

.. include:: ../userguide/plugins/menu.inc
.. argparse::
:module: kas.kas
:func: kas_get_argparser
:prog: kas
:path: menu
:manpage:

.. automodule:: kas.plugins.menu
:noindex:

.. include:: _kas-man-footer.inc
10 changes: 9 additions & 1 deletion docs/_man/kas-plugin-shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
kas shell plugin
================

.. include:: ../userguide/plugins/shell.inc
.. argparse::
:module: kas.kas
:func: kas_get_argparser
:prog: kas
:path: shell
:manpage:

.. automodule:: kas.plugins.shell
:noindex:

.. include:: _kas-man-footer.inc
61 changes: 49 additions & 12 deletions docs/userguide/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,68 @@ kas sub-commands are implemented by a series of plugins. Each plugin
typically provides a single command.

``build`` plugin
~~~~~~~~~~~~~~~~
----------------

.. include:: plugins/build.inc
.. automodule:: kas.plugins.build

.. argparse::
:module: kas.kas
:func: kas_get_argparser
:prog: kas
:path: build

``checkout`` plugin
~~~~~~~~~~~~~~~~~~~
-------------------

.. automodule:: kas.plugins.checkout

.. argparse::
:module: kas.kas
:func: kas_get_argparser
:prog: kas
:path: checkout

.. include:: plugins/checkout.inc

``dump`` plugin
~~~~~~~~~~~~~~~
---------------

.. automodule:: kas.plugins.dump

.. include:: plugins/dump.inc
.. argparse::
:module: kas.kas
:func: kas_get_argparser
:prog: kas
:path: dump

``for-all-repos`` plugin
~~~~~~~~~~~~~~~~~~~~~~~~
------------------------

.. include:: plugins/for-all-repos.inc
.. automodule:: kas.plugins.for_all_repos

.. argparse::
:module: kas.kas
:func: kas_get_argparser
:prog: kas
:path: for-all-repos

``menu`` plugin
~~~~~~~~~~~~~~~
---------------

.. automodule:: kas.plugins.menu

.. include:: plugins/menu.inc
.. argparse::
:module: kas.kas
:func: kas_get_argparser
:prog: kas
:path: menu

``shell`` plugin
~~~~~~~~~~~~~~~~
----------------

.. automodule:: kas.plugins.shell

.. include:: plugins/shell.inc
.. argparse::
:module: kas.kas
:func: kas_get_argparser
:prog: kas
:path: shell
8 changes: 0 additions & 8 deletions docs/userguide/plugins/build.inc

This file was deleted.

8 changes: 0 additions & 8 deletions docs/userguide/plugins/checkout.inc

This file was deleted.

8 changes: 0 additions & 8 deletions docs/userguide/plugins/dump.inc

This file was deleted.

8 changes: 0 additions & 8 deletions docs/userguide/plugins/for-all-repos.inc

This file was deleted.

8 changes: 0 additions & 8 deletions docs/userguide/plugins/menu.inc

This file was deleted.

8 changes: 0 additions & 8 deletions docs/userguide/plugins/shell.inc

This file was deleted.

0 comments on commit 3f46848

Please sign in to comment.