Terminal capture tool - Record terminal sessions as SVG animations
Project description
TermCap
TermCap 是一个用 Python 编写的 Unix 终端录制工具,可以将你的命令行会话渲染为独立的 SVG 动画。
特性
- 生成轻量级且外观整洁的动画,可嵌入到项目页面中
- 通过 SVG 模板 支持自定义颜色主题、终端 UI 和动画控制
- 兼容 asciinema 录制格式
安装
TermCap 兼容 Linux、macOS 和 BSD 操作系统,需要 Python >= 3.8,可以使用 pip 安装:
pip3 install --user termcap
使用方法
只需使用以下命令开始录制终端会话:
$ termcap record
Recording started.
Enter "exit" command or Control-D to end.
现在你处于一个子 shell 中,可以像往常一样输入命令。 完成后,退出 shell 即可结束录制:
$ exit
✓ 录制完成,时长: 10.5秒,共 42 个事件
Recording ended, cast file is /tmp/termcap_exp5nsr4.cast
最后,使用以下命令将录制内容渲染为 SVG 动画:
$ termcap render /tmp/termcap_exp5nsr4.cast animation.svg
Rendering started
✓ 渲染完成
Rendering ended, SVG animation is animation.svg
你也可以使用你喜欢的 Web 浏览器播放动画:
$ firefox animation.svg
许可证
MIT License
作者
- termcap: rexwzh (1073853456@qq.com)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file termcap-0.2.0.tar.gz.
File metadata
- Download URL: termcap-0.2.0.tar.gz
- Upload date:
- Size: 45.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49dc2aa1c18d7a116984cb698ddf1e8b8aefe40309f2e386c1857290acae57d9
|
|
| MD5 |
48fb8222f68726d04289b15ba633f2b8
|
|
| BLAKE2b-256 |
733e9763ae06e52115630ad4f96d8a0cd527ef495bd8f667dc310a87127ffb28
|
File details
Details for the file termcap-0.2.0-py3-none-any.whl.
File metadata
- Download URL: termcap-0.2.0-py3-none-any.whl
- Upload date:
- Size: 45.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de502f99ad6b6f5ef74709a0f07af4aa67390962676368e29ace801cb037d0d3
|
|
| MD5 |
05036ecc4252c4f093938e0017b07a06
|
|
| BLAKE2b-256 |
ac8aba17c1beeb664e3d8909b39acc133cb3319231d9f51a12aa3e8bb2324acd
|