teake / sphinxcontrib.asciinema

Easily embed asciinema videos into Sphinx documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sphinxcontrib-asciinema

Easily embed asciinema videos into Sphinx rst docs.

Installation

Clone and cd into this repository, then:

pip install .

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'
}

About

Easily embed asciinema videos into Sphinx documentation

License:MIT License


Languages

Language:CSS 91.5%Language:Python 8.5%