The Wayback Machine - https://web.archive.org/web/20200617131115/https://github.com/nbedos/termtosvg
Skip to content
This repository has been archived by the owner. It is now read-only.
Record terminal sessions as SVG animations
Python Makefile
Branch: develop
Clone or download

Latest commit

Latest commit 258a3fd Jun 16, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Update docs Nov 16, 2019
man Update manual page Nov 16, 2019
scripts Replace pkg_resources by pkgutil Jul 22, 2018
termtosvg Implement a --version command Mar 8, 2020
.travis.yml Allow job failure for Python 3.8-dev Jul 13, 2019
CHANGELOG.md Bump version to 1.1.0rc1 Jan 18, 2020
LICENSE Add licence May 9, 2018
MANIFEST.in Minor fixes for version 0.8.0 Jan 20, 2019
Makefile Update docs Nov 16, 2019
README.md Update README.md Jun 16, 2020
setup.py Bump version to 1.1.0 Jan 18, 2020

README.md

Note: As of June 2020 I do not have time to maintain termtosvg anymore and this repository is now read-only.

termtosvg

termtosvg is a Unix terminal recorder written in Python that renders your command line sessions as standalone SVG animations.

Example

Features

  • Produce lightweight and clean looking animations or still frames embeddable on a project page
  • Custom color themes, terminal UI and animation controls via user-defined SVG templates
  • Rendering of recordings in asciicast format made with asciinema

Installation

termtosvg is compatible with Linux, macOS and BSD OSes, requires Python >= 3.5 and can be installed as follows using pip:

# Create virtualenv named '.venv'
python3 -m venv .venv
# Activate virtualenv
source .venv/bin/activate
pip3 install termtosvg

Then run termtosvg by calling either termtosvg or python3 -m termtosvg.

Various independently maintained, OS specific packages have been made available by the community:

OS Repository Installation command
Archlinux Arch pacman -S termtosvg
FreeBSD ports
Gentoo media-gfx/termtosvg emerge media-gfx/termtosvg
macOS Homebrew brew install termtosvg
OpenBSD ports
NixOS nixpkgs

Basic usage

Start recording with:

$ termtosvg
Recording started, enter "exit" command or Control-D to end

You are now in a subshell where you can type your commands as usual. Once you are done, exit the shell to end the recording:

$ exit
Recording ended, file is /tmp/termtosvg_exp5nsr4.svg

Then, use your favorite web browser to play the animation:

$ firefox /tmp/termtosvg_exp5nsr4.svg

Finally, embedding the animation in e.g. a README.md file on GitHub can be achieved with a relative link to the animation:

![Example](./docs/examples/awesome_window_frame.svg)

See the manual page for more details.

Dependencies

termtosvg uses:

  • pyte to render the terminal screen
  • lxml to work with SVG data
You can’t perform that action at this time.