File: README.rst

package info (click to toggle)
sphinxcontrib-programoutput 0.17-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 288 kB
  • sloc: python: 910; makefile: 24
file content (67 lines) | stat: -rw-r--r-- 1,784 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
=============================
 sphinxcontrib-programoutput
=============================

.. image:: https://github.com/NextThought/sphinxcontrib-programoutput/workflows/tests/badge.svg
   :target: https://github.com/NextThought/sphinxcontrib-programoutput/actions?query=workflow%3Atests

.. image:: https://coveralls.io/repos/github/NextThought/sphinxcontrib-programoutput/badge.svg
   :target: https://coveralls.io/github/NextThought/sphinxcontrib-programoutput


https://sphinxcontrib-programoutput.readthedocs.org

A Sphinx_ extension to literally insert the output of arbitrary commands into
documents, helping you to keep your command examples up to date.


Installation
============

Install this extension from PyPI_::

   pip install sphinxcontrib-programoutput

The extension requires Sphinx 1.7.0 and Python 2.7 or Python 3 (Python
3.6+ is tested) at least.

Usage
=====

Just add this extension to ``extensions``::

   extensions = ['sphinxcontrib.programoutput']

Now you've two new directives ``program-output`` and ``command-output`` to
insert the output of programs.  The former just inserts the output::

   .. program-output:: python -V

Output::

   Python 2.7.1

The latter directive mimics a shell session, and is intended to show examples::

   .. command-output:: python -V

Output::

   $ python -V
   Python 2.7.1


Please refer to the documentation_ for comprehensive information about usage and
configuration of this extension.


Development and Support
=======================

Please refer to the documentation_ for information on support and the
development process.


.. _Sphinx: http://www.sphinx-doc.org/en/stable/
.. _PyPI: http://pypi.python.org/pypi/sphinxcontrib-programoutput
.. _documentation: http://sphinxcontrib-programoutput.readthedocs.org