This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Sphinx extension for OS code-blocks

Project Description

osexample extension for Sphinx

This is a modified fork of Serge Domkowski’s examplecode extension for Sphinx.

About

This is a simple extension that, when rendered as HTML, will fold multiple code blocks containing different operating systems administration examples into a single block which can be toggled from one to another using buttons.

It’s intended to be used for displaying package manager examples. (e.g., apt install or dnf install).

This extension adds the example-code directive which adds a class to a container wrapping the code blocks that should be folded. The class allows the included Javascript and CSS to render the folded block and buttons.

Currently supported are: Debian, Ubuntu, Fedora, CentOS, OSX

Quick Example

Source would look something like this:

.. example-code::
    .. code-block:: Debian

        sudo apt install htop

    .. code-block:: Fedora

        sudo dnf install htop

This will create an output like this:

Installation

$ pip install sphinxcontrib-osexample
Enabling the extension in Sphinx

Just add sphinxcontrib.examplecode to the list of extensions in the conf.py file. For example:

extensions = ['sphinxcontrib.osexample']

Documentation

Full documentation for end users can be found in the “docs” folder.

It is also available online on Read The Docs

Support

If you are having issues, please let us know.

License

The project is licensed under BSD.

Release History

Release History

This version
History Node

0.1.1

History Node

0.1.1.dev0

History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sphinxcontrib-osexample-0.1.1.tar.gz (4.8 kB) Copy SHA256 Checksum SHA256 Source Jan 15, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting