Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bczsalba/termage

Generate SVGs from any Python code, even in your documentation.
https://github.com/bczsalba/termage

documentation mkdocs mkdocs-material mkdocs-plugin pytermgui svg-images

Last synced: 3 months ago
JSON representation

Generate SVGs from any Python code, even in your documentation.

Awesome Lists containing this project

README

        

# Termage

See the [docs](https://termage.bczsalba.com) for some live examples.

`Termage` allows you to generate up-to-date, reproducible and _real_ screenshots of Python output while building your documentation. It uses [PyTermGUI](https://github.com/bczsalba/pytermgui) to create the SVGs, and pre-processes your markdown file into a `codefences` format.

![Code](https://raw.githubusercontent.com/bczsalba/mkdocs-termage-plugin/master/assets/code.png)
![Output](https://raw.githubusercontent.com/bczsalba/mkdocs-termage-plugin/master/assets/output.png)

## Installation

`Termage` is best installed using `pip`:

```
$ pip install mkdocs-termage-plugin
```

This installs the plugin, as well as PyTermGUI as a dependency. By this point you probably _should_ already have mkdocs installed.

## Setup

To use the plugin, you should first add it to your `mkdocs.yml` plugin list:

```yaml
plugins:
- termage
```