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.1.tar.gz
(158.6 kB
view hashes)
Built Distribution
Close
Hashes for sphinxcontrib.asciinema-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d1bb3f946904c16bc73e6e466750269e291ffcefb315b4b982d1025d4e8ef6e |
|
MD5 | bdacf3185d2e3089dd5d0a26c7242895 |
|
BLAKE2b-256 | cde990ac84bddcfcbfec13437ad32a5fbfac4ed50da9b2a9f0a96de68958b4d2 |
Close
Hashes for sphinxcontrib.asciinema-0.3.1-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | e95b6ed4cedd92f9baf04e3ff1910d93e422345a514cdbe23ca83c5c49f1b604 |
|
MD5 | aaae6e3397dfa71edc024098755eefb5 |
|
BLAKE2b-256 | a833cc770e11e7d377924a2750668efd4634ba16ed5e84c3a72ef90760039aa6 |