Skip to main content

A sphinx extension that allows generating wavedrom diagrams based on their textual representation

Project description

A sphinx extension that allows including wavedrom diagrams by using it’s text-based representation

Wavedrom online editor and tutorial: http://wavedrom.com/

https://travis-ci.org/bavovanachte/sphinx-wavedrom.svg?branch=master https://badge.fury.io/py/sphinxcontrib-wavedrom.svg

Installation

The wavedrom extension can be installed using pip:

pip install sphinxcontrib-wavedrom

and by adding ‘sphinxcontrib.wavedrom’ to the extensions list in your conf.py file.

Directives

The extension is useable in the form of an extra wavedrom directive, as shown below.

.. wavedrom::

        { signal: [
                { name: "clk",  wave: "P......" },
                { name: "bus",  wave: "x.==.=x", data: ["head", "body", "tail", "data"] },
                { name: "wire", wave: "0.1..0." }
        ]}

The extension will not generate an image out of the diagram description itself, but it will surround it with some html and js tags in the final html document that allow the images to be rendered by the browser.

Configuration

The extension can work in 2 modes:

  • Online mode: the extension links to the javascript file(s) provided by the wavedrom server

  • Offline mode: the extension uses the javascript file(s) that are saved locally on your drive.

The online mode is the default one. This requires no configuration in conf.py

If offline mode is desired, the following parameters need to be provided:

The paths given for these configurations need to be relative to the configuration directory (the directory that contains conf.py)

Examples

In the example folder, you can find a couple of examples (taken from the wavedrom tutorial), illustration the use of the extension.

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

sphinxcontrib-wavedrom-1.3.0.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file sphinxcontrib-wavedrom-1.3.0.tar.gz.

File metadata

File hashes

Hashes for sphinxcontrib-wavedrom-1.3.0.tar.gz
Algorithm Hash digest
SHA256 fdaaeb119e90a6bab40f4c917cae8397f76285910b317c5de67a2f17848767a6
MD5 ecf79e9e7a284aa0cfb7a9a684c0d981
BLAKE2b-256 16096144fe64656d7653f30beb9d845454a4b61fd4c10cfa56ce21d3ac9d4301

See more details on using hashes here.

Supported by

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