2019-02-25 11:27:32 +00:00
|
|
|
|
# asciinema
|
|
|
|
|
|
2019-10-18 03:33:27 +01:00
|
|
|
|
> 录制和播放终端会话,也可以把他们分享到 asciinema.org.
|
2024-02-15 06:36:16 +00:00
|
|
|
|
> 更多信息:<https://docs.asciinema.org/manual/cli/usage>.
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 将本地安装的`asciinema`与 asciinema.org 账号关联:
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
|
|
|
|
`asciinema auth`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 进行新的录制(完成后,将提示用户上传或在本地保存):
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
|
|
|
|
`asciinema rec`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 进行新的录制,保存到本地的文件中:
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
2019-02-25 14:55:39 +00:00
|
|
|
|
`asciinema rec {{文件路径}}.cast`
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 从本地文件中播放终端录屏:
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
2019-02-25 14:55:39 +00:00
|
|
|
|
`asciinema play {{文件路径}}.cast`
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 在 asciinema.org 中播放终端录屏:
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
2019-10-18 03:33:27 +01:00
|
|
|
|
`asciinema play https://asciinema.org/a/{{文件 ID}}`
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 进行新的录制,将闲置时间设置为最多 2.5 秒:
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
2024-02-15 06:36:16 +00:00
|
|
|
|
`asciinema rec -i 2.5`
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 打印本地保存的录像的完整输出:
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
2019-02-25 14:55:39 +00:00
|
|
|
|
`asciinema cat {{文件路径}}.cast`
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
2022-03-27 06:25:15 +01:00
|
|
|
|
- 从本地上传一个录屏到 asciinema.org:
|
2019-02-25 11:27:32 +00:00
|
|
|
|
|
2019-02-25 14:55:39 +00:00
|
|
|
|
`asciinema upload {{文件路径}}.cast`
|