1. svg-term-cli
Share terminal sessions as razor-sharp animated SVG everywhere
svg-term-cli
Package: svg-term-cli
Created by: marionebl
Last modified: Mon, 27 Jun 2022 02:36:31 GMT
Version: 2.1.1
License: MIT
Downloads: 1,690
Repository: https://github.com/marionebl/svg-term-cli

Install

npm install svg-term-cli
yarn add svg-term-cli

Share terminal sessions as razor-sharp animated SVG everywhere

Example generated with svg-term --cast 113643 --out examples/parrot.svg --window --no-cursor --from=4500

svg-term-cli

  • 💄 Render asciicast to animated SVG
  • 🌐 Share asciicasts everywhere (sans JS)
  • 🤖 Style with common color profiles

Install

npm install -g svg-term-cli

Usage

Generate the parrot.svg example from asciicast

svg-term --cast=113643 --out examples/parrot.svg --window

Interface

$ svg-term --help

  Share terminal sessions as razor-sharp animated SVG everywhere

  Usage
    $ svg-term [options]

  Options
    --at            timestamp of frame to render in ms [number]
    --cast          asciinema cast id to download [string], required if no stdin provided [string]
    --from          lower range of timeline to render in ms [number]
    --height        height in lines [number]
    --help          print this help [boolean]
    --in            json file to use as input [string]
    --no-cursor     disable cursor rendering [boolean]
    --no-optimize   disable svgo optimization [boolean]
    --out           output file, emits to stdout if omitted, [string]
    --padding       distance between text and image bounds, [number]
    --padding-x     distance between text and image bounds on x axis [number]
    --padding-y     distance between text and image bounds on y axis [number]
    --profile       terminal profile file to use, requires --term [string]
    --term          terminal profile format [iterm2, xrdb, xresources, terminator, konsole, terminal, remmina, termite, tilda, xcfe], requires --profile [string]
    --to            upper range of timeline to render in ms [number]
    --width         width in columns [number]
    --window        render with window decorations [boolean]

  Examples
    $ cat rec.json | svg-term
    $ svg-term --cast 113643
    $ svg-term --cast 113643 --out examples/parrot.svg

Rationale

Replace GIF asciicast recordings where you can not use the asciinema player, e.g. README.md files on GitHub and the npm registry.

The image at the top of this README is an example. See how sharp the text looks, even when you zoom in? That’s because it’s an SVG!

License

Copyright 2017. Released under the MIT license.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code