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
派生數437
提交數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: