• Stars
    star
    3,187
  • Rank 14,092 (Top 0.3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Share terminal sessions via SVG and CSS

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

  1. Install asciinema via: https://asciinema.org/docs/installation
  2. Install svg-term-cli:
    npm install -g svg-term-cli

Usage

Generate the parrot.svg example from asciicast at https://asciinema.org/a/113643

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]
    --command       command to record [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!

Related

Gallery

License

Copyright 2017. Released under the MIT license.

More Repositories

1

share-cli

🌍 Quickly share files from your command line
JavaScript
318
star
2

svg-term

Share terminal sessions via SVG and CSS
TypeScript
129
star
3

remote-share-cli

Merged with share-cli β‡₯
JavaScript
76
star
4

jogwheel

πŸ’Ώ Take control of your CSS keyframe animations
JavaScript
60
star
5

term-schemes

Parse and normalize common terminal emulator color schemes
TypeScript
29
star
6

jsonlint-cli

πŸ“cli wrapper for jsonlint
JavaScript
27
star
7

ts-transform-json-schema

Generate inline JSON schema from TypeScript types
TypeScript
27
star
8

dom-to-svg

Convert arbitrary DOM trees to SVG
TypeScript
23
star
9

ts-transformer-testing-library

Make testing custom TypeScript transformers a breeze
TypeScript
18
star
10

commitlint

Moved to https://github.com/conventional-changelog/commitlint
15
star
11

result

Rust Results for JavaScript
TypeScript
13
star
12

cz-conventional-changelog-lint

Deprecated. Use instead: https://git.io/vQ1oK
JavaScript
11
star
13

load-asciicast

Load, normalize and init asciinema asciicast data
JavaScript
10
star
14

rust-by-example-exercises

Exercise code written during first steps to learn Rust
Rust
8
star
15

omni-fetch

wrapper for isomorphic fetch with proxy support
JavaScript
8
star
16

option

Rust Options for JavaScript
TypeScript
8
star
17

react-jogwheel

Take control of your CSS keyframe animations with React
JavaScript
7
star
18

krampus

😈 Kill processes occupying a given port
JavaScript
7
star
19

tipi-cli

πŸŽͺ Project scaffolding for the entitled JavaScript developer
JavaScript
6
star
20

dothivify

Place digital stumbling blocks on your website to support the great cause of https://click4life.hiv/de
JavaScript
6
star
21

led-canvas

Lightweight led board implemented with canvas
JavaScript
6
star
22

eslint-plugin-flow-check

Integrate flowtype with eslint
JavaScript
5
star
23

babylon-jsx

Transform JSX in a babylon AST to call expressions
JavaScript
5
star
24

tslint-lerna-rules

TSLint rules for Lerna repos
TypeScript
5
star
25

puppeteer-core-electron

JavaScript
5
star
26

html-cli

Pretty print html
JavaScript
4
star
27

knowledge

πŸ’‘ document everything
4
star
28

timeline-export

Create a shareable timeline view for Chrome performance profiles
TypeScript
4
star
29

ansi-to-rgb

Get the appropriate RGB colors for ANSI color codes
JavaScript
3
star
30

ts-jest-ttypescript-repro

JavaScript
3
star
31

jenkins-project-cli

jenkins command line interface
JavaScript
3
star
32

cordova-statusbarchange

Example for passing along data from the native environment to webview via javascript events. Implemented for statusbar changes.
Objective-C
2
star
33

ts-transform-creator

Generated parameterized node factories from TypeScript source strings
TypeScript
2
star
34

led-canvas-fonts

Example LED fonts to be used with https://github.com/marionebl/led-canvas.
JavaScript
2
star
35

timeline-export-app

JavaScript
2
star
36

html-styles

Default styles for html tag names
JavaScript
2
star
37

ts-transform-node-env-inline

Inline the NODE_ENV environment variable
TypeScript
2
star
38

.files

personal .files for fun and profit
Shell
2
star
39

conventional-changelog-lint-config-angular

Deprecated. Use instead: https://git.io/vQ1oK
JavaScript
2
star
40

cairo

C
2
star
41

react-router

Backport of react-router@2 with React@16 compat
JavaScript
2
star
42

prosemirror-markdown-bundle-repro

HTML
1
star
43

n-resolve

Resolve files from node modules
JavaScript
1
star
44

blueant_api

🚧 Nothing to see here yet
Python
1
star
45

advent-of-ocaml

Puzzle solutions for Advent of Code 2018 in OCaml
OCaml
1
star
46

led-canvas-matrix

Matrix Class providing basic data structures for led-canvas and led-canvas-text
JavaScript
1
star
47

colorikeet

🚧Work in Progress - a minimal color math toolset
TypeScript
1
star
48

more-ocaml

🐫 Solutions for questions in More OCaml
OCaml
1
star
49

node-cubicle

Base image for turn-key Node.js development environments
Dockerfile
1
star
50

calculate-a11y-combinations

Calculate a cartesian product of a set of colors and check their contrast ratio according to W3C recommendations.
JavaScript
1
star
51

dimmer

Simple dark/light theme switcher
JavaScript
1
star
52

git-editor

Editor dedicated to git commit messages
JavaScript
1
star
53

macos-app-config

Get the configuration for macOS applications
TypeScript
1
star
54

led-canvas-text

Generate text matrices compatible with led-canvas
JavaScript
1
star
55

classify-code

Detect programming languages
JavaScript
1
star
56

paternoster

An agnoster inspired zsh theme
Shell
1
star
57

tessdata

tessdata for consumption via npm
JavaScript
1
star
58

nano-event-emitter

Minimal extendable jQuery-style event emitter written in ES6
JavaScript
1
star
59

guess-terminal

Guess the current terminal emulator program
TypeScript
1
star
60

prosemirror

A personal experiment libraries over prosemirror project
TypeScript
1
star
61

eslint-plugin-patternplate

Integrate patternplate with eslint
JavaScript
1
star
62

cooky

Extract ingredients from a list for kptncook.com urls
TypeScript
1
star
63

ws-miner

Tunnel https?:// over wss?://
TypeScript
1
star
64

conventional-changelog-lint-config-lerna-scopes

Deprecated. Use instead: https://git.io/vQ1oK
JavaScript
1
star
65

pathfinder-experiments

Rust
1
star
66

playwright-docker-repro

TypeScript
1
star
67

patternplate-transform-node-sass

Process SASS and SCSS to CSS with patternplate
JavaScript
1
star
68

ts-transform-cli-args

Generate CLI arg parsers from TypeScript interfaces
TypeScript
1
star
69

real-world-ocaml

1
star
70

led-canvas-led

Example LED class to be used by https://github.com/marionebl/led-canvas.
JavaScript
1
star
71

rust-book-exercises

Exercise code written while following along the Rust Book
Rust
1
star