Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marionebl/svg-term-cli
Share terminal sessions via SVG and CSS
https://github.com/marionebl/svg-term-cli
Last synced: 10 days ago
JSON representation
Share terminal sessions via SVG and CSS
- Host: GitHub
- URL: https://github.com/marionebl/svg-term-cli
- Owner: marionebl
- License: mit
- Created: 2017-11-25T16:08:35.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-01T23:04:21.000Z (6 months ago)
- Last Synced: 2024-10-22T08:09:40.699Z (18 days ago)
- Language: JavaScript
- Size: 397 KB
- Stars: 3,539
- Watchers: 18
- Forks: 118
- Open Issues: 47
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-nodejs-cn - svg-term-cli - 基于 SVG 分享终端会话 (包 / 命令行程序)
- awesome-nodejs-cn - svg-term-cli - **star:3476** 通过 SVG 共享终端会话 ![star > 2000][Awesome] (包 / 命令行程序)
- stars - marionebl/svg-term-cli - Share terminal sessions via SVG and CSS (JavaScript)
- awesometools - svg-term-cli - Share terminal sessions via SVG and CSS (For Developers / Utilities)
- awesome-nodejs - svg-term-cli - Share terminal sessions via SVG. (Packages / Command-line apps)
- awesome-nodejs - svg-term-cli - Share terminal sessions via SVG and CSS - ★ 884 (Command-line apps)
- awesome-node - svg-term-cli - Share terminal sessions via SVG. (Packages / Command-line apps)
- awesome-nodejs-cn - svg-term-cli - 通过SVG分享终端会话. (目录 / 命令行应用)
README
> 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](https://github.com/marionebl/term-schemes#supported-formats)## Install
1. Install asciinema via: https://asciinema.org/docs/installation
2. Install svg-term-cli:
```sh
npm install -g svg-term-cli
```## Usage
Generate the `parrot.svg` example from asciicast at
```
svg-term --cast=113643 --out examples/parrot.svg --window
```## Interface
```
λ svg-term --helpShare 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](https://asciinema.org/), 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
* [asciinema/asciinema](https://github.com/asciinema/asciinema) - Terminal session recorder
* [derhuerst/asciicast-to-svg](https://github.com/derhuerst/asciicast-to-svg) - Render frames of Asciicasts as SVGs
* [marionebl/svg-term](https://github.com/marionebl/svg-term) - Render asciicast to animated SVG
* [marionebl/term-schemes](https://github.com/marionebl/term-schemes) - Parse and normalize common terminal emulator color schemes## Gallery
* [marionebl/commitlint](https://github.com/marionebl/commitlint)
* [marionebl/share-cli](https://github.com/marionebl/share-cli)
* [marionebl/remote-share-cli](https://github.com/marionebl/remote-share-cli)## License
Copyright 2017. Released under the MIT license.