asciinema 这个东西很好玩

官网链接: https://asciinema.org/

github:https://github.com/asciinema/asciinema

安装就不说那么详细了。官网有说安装教程。如果出现错误 删掉它继续装

#Wget源码方式运行(最新版本)
#安装epel发行包
yum -y install epel-release
#安装python34
yum -y install python34 unzip wget
#安装pip和setuptools
curl -O https://bootstrap.pypa.io/get-pip.py
/usr/bin/python3.4 get-pip.py
#下载源码
wget https://github.com/asciinema/asciinema/archive/develop.zip
unzip develop.zip
cd asciinema-develop/
#测试版本
python3 -m asciinema --version
#安装
python3 setup.py install
#用命令测试版本
asciinema --version
#删除asciinema
yum -y remove asciinema

设置 有用户登录SSL自动运行并且记录用户的操作:

编辑root目录下 .bash_profile 文件

export LANG=zh_CN.UTF-8
export LC_ALL=zh_CN.UTF-8
# asciinema rec /root/asciinema/1.json -q --append
asciinema rec /root/asciinema/$USER-$(date +%Y%m%d%H%M%S).json -q
# asciinema rec -t $USER-$(date +%Y%m%d%H%M%S).json -q --append
在最后添加一下代码。退出ssl登录。再登录即可看见/root/asciinema/目录下的json文件。可以上传给 asciinema 服务器。也可以本地html播放。。。蛮好玩的记录下

发表回复