Rich recently added two interesting new features.
The first feature is SVG support. Anything printed to the terminal with Rich can be captured and exported to an SVG file. The output is somewhat like a screenshot but generated within Rich itself (it doesn't peek at your desktop).
A SVG generated from Rich (converted to a PNG).
I think these SVGs will be useful for sharing terminal output, particularly for documentation.
The API to save SVGs works in the same way as the methods to save / export text and HTML. Here's the code that generated the above image: continue reading…