Introduction
Termage is a wrapper library for PyTermGUI's SVG export functionalities. Other than providing the module, it also offers a CLI and an MkDocs plugin to put SVGs just about anywhere you can think of.
Termage has native support for capturing applications based on PyTermGUI's WindowManager!
from pytermgui import tim, ColorPicker
from pytermgui.pretty import print
tim.print("Welcome to [!gradient(112) bold]Termage[/]!\n")
tim.print("Termage allows you to display [italic]any[/italic] terminal output in a terminal-mimicking [bold]SVG[/bold]!")
tim.print("\nHere are the current locals:")
print(locals())
Installation
Termage is best installed using pip:
$ pip install termage
This will install PyTermGUI, as well as Termage. The MkDocs plugin is included within the installation as well.
import pytermgui as ptg
with ptg.WindowManager() as manager:
manager.layout.add_slot("Body")
manager.add(
ptg.Window(
ptg.inspect(ptg.inspect),
box="EMPTY",
),
)