Sphinx extension for capturing program output
Python
Switch branches/tags
Clone or download
Latest commit 43d6d62 Sep 4, 2017
Permalink
Failed to load latest commit information.
doc
src/sphinxcontrib
.coveragerc
.gitignore
.pylintrc
.travis.yml
CHANGES.rst
LICENSE
MANIFEST.in
README.rst
setup.cfg
setup.py
tox.ini

README.rst

sphinxcontrib-programoutput

https://secure.travis-ci.org/NextThought/sphinxcontrib-programoutput.png

http://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.3.5 and Python 2.7 or Python 3 (Python 3.5+ 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.