• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

man/H18-Jan-2020-484473

scripts/H18-Jan-2020-73

termtosvg/H18-Jan-2020-8,2135,604

termtosvg.egg-info/H03-May-2022-2524

LICENSEH A D18-Jan-20201.5 KiB3023

MANIFEST.inH A D18-Jan-2020167 86

PKG-INFOH A D18-Jan-2020953 2524

README.mdH A D18-Jan-20202.7 KiB7356

setup.cfgH A D18-Jan-202038 53

setup.pyH A D18-Jan-20201.4 KiB5147

README.md

1[![Build Status](https://travis-ci.com/nbedos/termtosvg.svg?branch=develop)](https://travis-ci.com/nbedos/termtosvg)
2
3
4# termtosvg
5termtosvg is a Unix terminal recorder written in Python that renders your command
6line sessions as standalone SVG animations.
7
8![Example](./docs/examples/awesome_window_frame_powershell.svg)
9
10* [Gallery of examples](https://nbedos.github.io/termtosvg/pages/examples.html)
11* [Gallery of templates](https://nbedos.github.io/termtosvg/pages/templates.html)
12
13## Features
14* Produce lightweight and clean looking animations or still frames embeddable on a project page
15* Custom color themes, terminal UI and animation controls via user-defined [SVG templates](man/termtosvg-templates.md)
16* Rendering of recordings in asciicast format made with asciinema
17
18## Installation
19termtosvg is compatible with Linux, macOS and BSD OSes, requires Python >= 3.5 and can be installed as follows using pip:
20```shell
21# Create virtualenv named '.venv'
22python3 -m venv .venv
23# Activate virtualenv
24source .venv/bin/activate
25pip3 install termtosvg
26```
27Then run termtosvg by calling either `termtosvg` or `python3 -m termtosvg`.
28
29Various independently maintained, OS specific packages have been made available by the community:
30
31| OS       | Repository  | Installation command  |
32|----------|-------------|---|
33| Archlinux  | [Arch](https://www.archlinux.org/packages/community/any/termtosvg/)  |`pacman -S termtosvg`   |
34| FreeBSD | [ports](https://www.freshports.org/graphics/py-termtosvg) | |
35| Gentoo | [media-gfx/termtosvg](https://packages.gentoo.org/packages/media-gfx/termtosvg) | `emerge media-gfx/termtosvg`|
36| macOS  | [Homebrew](https://formulae.brew.sh/formula/termtosvg)  |`brew install termtosvg`   |
37| OpenBSD  | [ports](https://github.com/openbsd/ports/tree/master/graphics/termtosvg)  |   |
38| NixOS | [nixpkgs](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/termtosvg/) | |
39
40
41## Basic usage
42Start recording with:
43
44```
45$ termtosvg
46Recording started, enter "exit" command or Control-D to end
47```
48
49You are now in a subshell where you can type your commands as usual.
50Once you are done, exit the shell to end the recording:
51
52```
53$ exit
54Recording ended, file is /tmp/termtosvg_exp5nsr4.svg
55```
56Then, use your favorite web browser to play the animation:
57```
58$ firefox /tmp/termtosvg_exp5nsr4.svg
59```
60
61Finally, embedding the animation in e.g. a [README.md](README.md) file on GitHub can
62be achieved with a relative link to the animation:
63```markdown
64![Example](./docs/examples/awesome_window_frame.svg)
65```
66
67See the [manual page](man/termtosvg.md) for more details.
68
69## Dependencies
70termtosvg uses:
71* [pyte](https://github.com/selectel/pyte) to render the terminal screen
72* [lxml](https://github.com/lxml/lxml) to work with SVG data
73