Sphinx Termynal#
Create animated terminal window in your Sphinx documentation.
Installation#
$ pip install sphinx-termynal
Usage#
Add the extension to
conf.py:
extensions = [
...
"sphynx_terminal",
...
]
Use the extension in your documentation:
You can now use it in your documentation files. For example:
.. termynal::
$ pip install sphinx-termynal
-->
sphinx-termynal installed
```{termynal}
$ pip install sphinx-termynal
-->
sphinx-termynal installed
```
This will produce the following terminal animation:
pip install sphinx-termynal
sphinx-termynal installed
A line starting with
$will be rendered as input command.A line starting with
-->is rendered as a progress bar.Everything else is rendered as it is.
Example: Multi-line command#
.. termynal::
$ pip install sphinx-termynal \
sphinx \
numpy
-->
done
```{termynal}
$ pip install sphinx-termynal \
sphinx \
numpy
-->
done
```
pip install sphinx-termynal \
sphinx \
numpy
done
Example: Special characters#
.. termynal::
$ < > & " '
```{termynal}
$ < > & " '
```
< > & " '
Credits#
Thanks ines, termynal.py