Record/play asciicast files
Available since v0.9
console2svg can interoperate with the asciicast v2 format commonly used by the terminal recording tool asciinema.
Recording asciicast
Section titled “Recording asciicast”Specify the --save-cast option to save execution output in asciicast format (.cast).
console2svg capture --save-cast session.cast -- cargo buildThe saved .cast file can also be played with normal tools such as asciinema play.
Embedding data in SVG (--embed-cast)
Section titled “Embedding data in SVG (--embed-cast)”Specify the --embed-cast option to embed asciicast data in the metadata area inside the generated SVG file.
console2svg capture --embed-cast -o output.svg -- fastfetchPlaying and converting asciicast
Section titled “Playing and converting asciicast”Use the cast subcommand to render SVGs or videos from existing .cast files.
# Output as a static SVGconsole2svg cast session.cast -o session.svg
# Output as a video (GIF)console2svg cast session.cast -v -o session.gif -t monokaiOr specify capture --in.
console2svg capture --in session.cast -d macos-pc -o output.svg