11[ ![ Build Status] ( https://travis-ci.org/nbedos/termtosvg.svg?branch=master )] ( https://travis-ci.org/nbedos/termtosvg )
22
33# termtosvg
4- termtosvg is a Linux terminal recorder written in Python that renders your command
4+ termtosvg is a Unix terminal recorder written in Python that renders your command
55line sessions as standalone SVG animations.
66
77<p align =" center " >
8- <img src="https://cdn.rawgit.com/nbedos/ termtosvg/0.4.0/ examples/awesome .svg">
8+ <img src="https://nbedos.github.io/ termtosvg/examples/awesome_window_frame .svg">
99</p >
1010
11- More examples of recordings can be found [ here] ( https://github.com/nbedos/termtosvg/blob/0.4.0/examples/examples.md )
12-
13- ## Motivation
14- I really like the clean look of SVG animations. I wanted to see
15- how this solution would hold out against other terminal
16- recorders such as [ asciinema] ( https://github.com/asciinema/asciinema ) .
11+ * [ Gallery of examples] ( https://nbedos.github.io/termtosvg/pages/examples.html )
12+ * [ Gallery of templates] ( https://nbedos.github.io/termtosvg/pages/templates.html )
13+ * [ Manual page] ( man/termtosvg.md )
1714
15+ ## Features
16+ * Produce lightweight and clean looking animations embeddable on a project page
17+ * Custom color themes, terminal UI and animation controls via [ SVG templates] ( man/termtosvg-template.md )
18+ * Compatible with asciinema recording format
19+
1820## Installation
19- termtosvg is compatible with Python >= 3.5 and can be installed using pip:
21+ termtosvg is compatible with Linux, Mac OS and BSD OSes, requires Python >= 3.5 and can be installed using pip:
2022```
2123pip3 install --user termtosvg
2224```
@@ -42,94 +44,7 @@ Finally, use your favorite web browser to play the animation:
4244$ firefox /tmp/termtosvg_exp5nsr4.svg
4345```
4446
45- ### Detailed usage
46- ```
47- $ termtosvg --help
48- usage: termtosvg [output_file] [--font FONT] [--theme THEME] [--help] [--verbose]
49- Record a terminal session and render an SVG animation on the fly
50-
51- positional arguments:
52- output_file optional filename of the SVG animation; if missing, a random
53- filename will be automatically generated
54-
55- optional arguments:
56- -h, --help show this help message and exit
57- --font FONT font to specify in the CSS portion of the SVG animation
58- (DejaVu Sans Mono, Monaco...). If the font is not installed
59- on the viewer's machine, the browser will display a default
60- monospaced font instead.
61- --theme THEME color theme used to render the terminal session (circus,
62- classic-dark, classic-light, dracula, isotope, marrakesh,
63- material, monokai, solarized-dark, solarized-light, zenburn)
64- -v, --verbose increase log messages verbosity
65-
66- See also 'termtosvg record --help' and 'termtosvg render --help'
67- ```
68-
69- ### Subcommands
70- Rendering the SVG animation while recording sometimes slows down
71- the commands being executed due to the CPU usage. It is possible
72- to proceed in two ways:
73- 1 . Record the terminal session to disk in asciicast v2 format
74- 2 . Render the SVG animation using the recording on disk
75-
76- The detailed usage of these two commands is available with
77- ` termtosvg record --help ` and ` termtosvg render --help `
78-
79- ### Configuration
80- termtosvg configuration file is located at ` ~/.config/termtosvg/termtosvg.ini `
81- and will be created by termtosvg if it does not exist. The configuration
82- file is self-documenting but here are the basics.
83-
84- #### Global section
85- The 'global' section of the file specifies the font and color theme used.
86-
87- ```
88- [global]
89- font = DejaVu Sans Mono
90- theme = solarized-dark
91- ```
92- These options can be overridden at the command line with the ` --font ` and
93- ` --theme ` flags.
94-
95- #### Color themes
96- All other sections of the file define color themes. For example here's
97- the definition of the theme 'circus':
98- ```
99- [circus]
100- foreground = #a7a7a7
101- background = #191919
102- color0 = #191919
103- color1 = #dc657d
104- color2 = #84b97c
105- color3 = #c3ba63
106- color4 = #639ee4
107- color5 = #b888e2
108- color6 = #4bb1a7
109- color7 = #a7a7a7
110- color8 = #5f5a60
111- color9 = #4bb1a7
112- color10 = #202020
113- color11 = #303030
114- color12 = #505050
115- color13 = #808080
116- color14 = #b888e2
117- color15 = #ffffff
118- ```
119-
120- Color themes can be added, removed or modified. Once a color theme
121- has been added to the configuration it can be referred to in the global
122- section of the configuration file, or be used at the command line as a
123- parameter to the ` --theme ` flag.
124-
125- Definitions for the foreground and background colors, as well as for color0 to
126- color7 are mandatory. If color8 through color15 (bright ANSI colors) are
127- defined, they are used to display bold characters as a
128- replacement for color0 through color7.
129-
13047## Dependencies
13148termtosvg uses:
13249* [ pyte] ( https://github.com/selectel/pyte ) to render the terminal screen
133- * [ svgwrite] ( https://github.com/mozman/svgwrite ) to create SVG animations
134- * [ base16-xresources] ( https://github.com/chriskempson/base16-xresources ) for default color themes
135- * [ rawgit] ( https://rawgit.com/ ) for hosting SVG animations displayed here on GitHub [ rawgit on GitHub] ( https://github.com/rgrove/rawgit ) )
50+ * [ lxml] ( https://github.com/lxml/lxml ) to work with SVG data
0 commit comments