Skip to main content

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

Project description

Termage

See the docs 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 to create the SVGs, and pre-processes your markdown file into a codefences format.

Code Output

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:

plugins:
    - termage

Latest release

0.6.0 - 2022-08-22

Additions

  • Add support for inserting SVGs inline, without writing files

Refactors

  • Unify the codeblock-formatting API under execution.format_codeblock
  • Rewrite & refactor most of the plugin to be more maintainable
  • Refactor the Python API so that the termage function is called by the CLI, not the other way around.

Read the full changelog here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

termage-0.6.0.tar.gz (3.0 MB view hashes)

Uploaded Source

Built Distribution

termage-0.6.0-py3-none-any.whl (9.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page