Skip to content

Commit 7698cac

Browse files
kdeldyckestephenfin
authored andcommitted
Points to alternative to complement Click-based CLI documentation.
1 parent 2ce4c2d commit 7698cac

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

README.rst

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ sphinx-click
1010
:target: https://sphinx-click.readthedocs.io/en/latest/?badge=latest
1111
:alt: Documentation Status
1212

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

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

1919
Installation
2020
------------
2121

22-
Install the plugin using `pip`:
22+
Install the plugin using ``pip``:
2323

2424
.. code-block:: shell
2525
2626
$ pip install sphinx-click
2727
28-
Alternatively, install from source by cloning this repo then running `pip`
28+
Alternatively, install from source by cloning this repo then running ``pip``
2929
locally:
3030

3131
.. code-block:: shell
@@ -37,10 +37,10 @@ Usage
3737

3838
.. important::
3939

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

43-
Enable the plugin in your Sphinx `conf.py` file:
43+
Enable the plugin in your Sphinx ``conf.py``` file:
4444

4545
.. code-block:: python
4646
@@ -57,3 +57,19 @@ documentation.
5757
5858
Detailed information on the various options available is provided in the
5959
`documentation <https://sphinx-click.readthedocs.io>`_.
60+
61+
Alternative
62+
-----------
63+
64+
This plugin is perfect to document a Click-based CLI in Sphinx, as it properly
65+
renders the help screen and its options in nice HTML with deep links and
66+
styling.
67+
68+
However, if you are looking to document the source code of a Click-based CLI,
69+
and the result of its execution, you might want to check out `click-extra`__.
70+
The latter provides the ``.. click:example::`` and ``.. click:run::`` Sphinx
71+
directives so you can `capture and render, with full colors, the result of your
72+
CLI in your documentation`__.
73+
74+
__ https://github.com/kdeldycke/click-extra/
75+
__ https://kdeldycke.github.io/click-extra/sphinx.html

0 commit comments

Comments
 (0)