Skip to content

Commit

Permalink
Points to alternative to complement Click-based CLI documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke authored and stephenfin committed Dec 6, 2022
1 parent 2ce4c2d commit 7698cac
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ sphinx-click
:target: https://sphinx-click.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

`sphinx-click` is a `Sphinx`__ plugin that allows you to automatically extract
documentation from a `click-based`__ application and include it in your docs.
``sphinx-click`` is a `Sphinx`__ plugin that allows you to automatically extract
documentation from a `Click-based`__ application and include it in your docs.

__ http://www.sphinx-doc.org/
__ http://click.pocoo.org/

Installation
------------

Install the plugin using `pip`:
Install the plugin using ``pip``:

.. code-block:: shell
$ pip install sphinx-click
Alternatively, install from source by cloning this repo then running `pip`
Alternatively, install from source by cloning this repo then running ``pip``
locally:

.. code-block:: shell
Expand All @@ -37,10 +37,10 @@ Usage

.. important::

To document a click-based application, both the application itself and any
To document a Click-based application, both the application itself and any
additional dependencies required by that application **must be installed**.

Enable the plugin in your Sphinx `conf.py` file:
Enable the plugin in your Sphinx ``conf.py``` file:

.. code-block:: python
Expand All @@ -57,3 +57,19 @@ documentation.
Detailed information on the various options available is provided in the
`documentation <https://sphinx-click.readthedocs.io>`_.

Alternative
-----------

This plugin is perfect to document a Click-based CLI in Sphinx, as it properly
renders the help screen and its options in nice HTML with deep links and
styling.

However, if you are looking to document the source code of a Click-based CLI,
and the result of its execution, you might want to check out `click-extra`__.
The latter provides the ``.. click:example::`` and ``.. click:run::`` Sphinx
directives so you can `capture and render, with full colors, the result of your
CLI in your documentation`__.

__ https://github.com/kdeldycke/click-extra/
__ https://kdeldycke.github.io/click-extra/sphinx.html

0 comments on commit 7698cac

Please sign in to comment.