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
Release history Release notifications | RSS feed
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.3.tar.gz
(158.6 kB
view hashes)
Built Distribution
Close
Hashes for sphinxcontrib.asciinema-0.3.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbc31d016e914c4242b95219a45a9e1005ae3d1239a248bd5f5c909f20a2905d |
|
MD5 | d454e24ffae06da2ba8c11de741bcc7c |
|
BLAKE2b-256 | b73126496f124999656e7c26ac53dbe0de47828b9d178854f7faf303ca1aab34 |
Close
Hashes for sphinxcontrib.asciinema-0.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdd7ff5a698a5b52f39a46cbccaa56868adb970a744e9f5fcc26c29146a5c6ad |
|
MD5 | 450ec231c45def5905a64c141496a048 |
|
BLAKE2b-256 | c729727a225d886c01a0ac201d6eb617f48a04fbc4f19e17468298c0d98326c2 |