Skip to main content

Sphinx extension to include program output

Project description

https://secure.travis-ci.org/NextThought/sphinxcontrib-programoutput.png https://coveralls.io/repos/github/NextThought/sphinxcontrib-programoutput/badge.svg

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 nti.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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nti.sphinxcontrib-programoutput-0.9.tar.gz (17.3 kB view hashes)

Uploaded Source

Built Distribution

nti.sphinxcontrib_programoutput-0.9-py2.py3-none-any.whl (19.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page