1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-17 06:35:43 +02:00
tldr/pages.zh/common/asciinema.md

34 lines
924 B
Markdown
Raw Normal View History

2019-02-25 19:27:32 +08:00
# asciinema
> 录制和回放终端会话,并可选分享到 <https://asciinema.org>。
> 另见:`terminalizer`。
> 更多信息:<https://docs.asciinema.org/manual/cli/usage>.
2019-02-25 19:27:32 +08:00
- 将本地安装的 `asciinema` 与 asciinema.org 账号关联:
2019-02-25 19:27:32 +08:00
`asciinema auth`
- 新建录制并保存到本地文件(按 `<Ctrl d>` 或输入 `exit` 结束):
2019-02-25 19:27:32 +08:00
`asciinema rec {{路径/到/录制文件.cast}}`
2019-02-25 19:27:32 +08:00
- 从本地文件回放终端录制:
2019-02-25 19:27:32 +08:00
`asciinema play {{路径/到/录制文件.cast}}`
2019-02-25 19:27:32 +08:00
- 回放托管在 <https://asciinema.org> 的终端录制:
2019-02-25 19:27:32 +08:00
2019-10-18 10:33:27 +08:00
`asciinema play https://asciinema.org/a/{{文件 ID}}`
2019-02-25 19:27:32 +08:00
- 新建录制,限制空闲时间最多 2.5 秒:
2019-02-25 19:27:32 +08:00
`asciinema rec {{[-i|--idle-time-limit]}} 2.5`
2019-02-25 19:27:32 +08:00
- 打印本地保存录制的完整输出:
2019-02-25 19:27:32 +08:00
`asciinema cat {{路径/到/录制文件.cast}}`
2019-02-25 19:27:32 +08:00
- 上传本地保存的终端录制到 asciinema.org:
2019-02-25 19:27:32 +08:00
`asciinema upload {{路径/到/录制文件.cast}}`