Skip to main content

Embed asciinema casts in your Sphinx docs

Project description

sphinxcontrib-asciinema

Easily embed asciinema videos into Sphinx rst docs.

Installation

Clone and cd into this repository, then:

pip install .

or install from PyPI:

pip install sphinxcontrib.asciinema

Usage

Append extension to sphinx conf.py:

extensions = ['sphinxcontrib.asciinema']

Insert videos into .rst docs by embedding them from asciinema.org:

.. asciinema:: 261648

or for a local file with a self-hosted web player:

.. asciinema:: local_file.cast

It is possible to give options as well:

.. asciinema:: local_file.cast
   :preload: 1
   :theme: solarized-dark

You can enter all options from the self-hosted player and the embedded asciinema.org player.

Default options can be set in conf.py:

sphinxcontrib_asciinema_defaults = {
    'theme': 'solarized-dark',
    'preload': 1,
    'font-size': '15px',
#    'path': 'path/to/castdir'
}

The "path" option can be specified to set the default cast file directory. If a local file path starts with "./", the option is ignored.

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.asciinema-0.4.2.tar.gz (76.7 kB view details)

Uploaded Source

File details

Details for the file sphinxcontrib.asciinema-0.4.2.tar.gz.

File metadata

File hashes

Hashes for sphinxcontrib.asciinema-0.4.2.tar.gz
Algorithm Hash digest
SHA256 ab38b3e376f335d3e87f445e3ecbd0524e61bab380760c54c32ee4d4a95c3a59
MD5 0c3a349cc6b1f9c0d65eed012cb82c01
BLAKE2b-256 c8b8a5e405c1c5eae37e466866ed4053613c5a4d75531819426941825a042228

See more details on using hashes here.

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