Skip to content
This repository was archived by the owner on Jun 16, 2020. It is now read-only.

Commit 59081f5

Browse files
committed
Setup GitHub pages, manual pages
1 parent bf59a4b commit 59081f5

36 files changed

+647
-424
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static:
4747
(test -d $(VENV_PATH) || python -m venv $(VENV_PATH))
4848
$(VENV_ACTIVATE) && \
4949
rm -r examples/*.svg && \
50+
termtosvg render $(CASTS_DIR)/awesome.cast $(EXAMPLES_DIR)/awesome_window_frame.svg -t window_frame && \
5051
termtosvg render $(CASTS_DIR)/awesome.cast $(EXAMPLES_DIR)/awesome_window_frame_js.svg -t window_frame_js && \
5152
termtosvg render $(CASTS_DIR)/colors.cast $(EXAMPLES_DIR)/colors_progress_bar.svg -t progress_bar && \
5253
termtosvg render $(CASTS_DIR)/htop.cast $(EXAMPLES_DIR)/htop_gjm8.svg -t gjm8 && \

README.md

Lines changed: 12 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
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
55
line 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
```
2123
pip3 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
13148
termtosvg 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

docs/Makefile

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/examples/awesome_window_frame.svg

Lines changed: 47 additions & 0 deletions
Loading

docs/examples/awesome_window_frame_js.svg

Lines changed: 12 additions & 14 deletions
Loading

docs/examples/colors_progress_bar.svg

Lines changed: 12 additions & 12 deletions
Loading

docs/examples/htop_gjm8.svg

Lines changed: 12 additions & 12 deletions
Loading

docs/examples/ipython_window_frame.svg

Lines changed: 12 additions & 13 deletions
Loading

docs/examples/unittest_solarized_dark.svg

Lines changed: 12 additions & 12 deletions
Loading

docs/pages/examples.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h1><a href="../index.html">termtosvg</a></h1>
1919
<section id="content" class="body">
2020
<h1 class="entry-title">examples</h1>
2121

22-
<p>Here are examples of recordings made by termtosvg.</p>
22+
<p>Here are examples of recordings made by termtosvg and rendered with various SVG templates.</p>
2323

2424
<h2>termtosvg command line session (window_frame_js template)</h2>
2525
<p align="center">

0 commit comments

Comments
 (0)