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.3.5.tar.gz (158.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: sphinxcontrib.asciinema-0.3.5.tar.gz
  • Upload date:
  • Size: 158.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.26.0 setuptools/60.5.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.10

File hashes

Hashes for sphinxcontrib.asciinema-0.3.5.tar.gz
Algorithm Hash digest
SHA256 39d6aed5f69652db53e939ecf618fa0157306781d1b3409e3beac3426fd133a7
MD5 52106d7d7106f4f85b5a3726e74d8c24
BLAKE2b-256 758af270e570dca2c40ecf0c8a086715e1d7f947fefdd86739f77529145463bc

See more details on using hashes here.

Supported by

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