termtosvg

将终端会话记录为 SVG 动画。「Record terminal sessions as SVG animations」

Github星跟踪图

注意:自2020年6月起,我不再有时间维护termtosvg,并且此存储库现在为只读。

termtosvg

termtosvg 是用 Python 编写的 Unix 终端记录器,可将命令行会话呈现为独立的 SVG 动画。

特性

制作轻巧,外观清晰的动画或可嵌入项目页面的静止帧
通过用户定义的SVG模板自定义颜色主题,终端UI和动画控件
呈现以asciinema格式制作的asciicast格式的录音

安装

termtosvg 与 Linux、macOS 和 BSD 操作系统兼容,要求 Python>= 3.5,并且可以使用 pip 如下安装:

#创建名为 '.venv' 的 virtualenv
python3 -m venv .venv
#激活 virtualenv
source .venv/bin/activate
pip3 install termtosvg

然后通过调用 termtosvg 或 python3 -m termtosvg 运行 termtosvg。

社区提供了各种独立维护的,特定于操作系统的软件包:

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

基本用法

开始录制:

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

现在,您位于 subshell 中,可以像往常一样键入命令。 完成后,退出外壳程序以结束记录:

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

然后,使用您喜欢的 Web 浏览器播放动画:

$ firefox /tmp/termtosvg_exp5nsr4.svg

最后,将动画嵌入到诸如 GitHub 上的 README.md 文件,可以通过动画的相对链接来实现:

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

有关更多详细信息,请参见手册页

依存关系

termtosvg 使用:

  • pyte 渲染终端屏幕
  • lxml 使用 SVG 数据

主要指标

概览
名称与所有者nbedos/termtosvg
主编程语言Python
编程语言Makefile (语言数: 2)
平台BSD, Linux, Mac
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2018-06-09 13:52:09
推送于2020-06-16 11:01:41
最后一次提交2020-01-18 21:02:59
发布数20
最新版本名称1.1.0 (发布于 )
第一版名称0.1.0 (发布于 2018-06-16 19:05:08)
用户参与
星数9.7k
关注者数131
派生数436
提交数190
已启用问题?
问题数86
打开的问题数11
拉请求数19
打开的拉请求数1
关闭的拉请求数15
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

Build Status

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: