おおまかな流れ
- ttyrecで録画
- ttygifでアニメーションgif化
セットアップ
ttyrecインストール
brew install ttyrec
ttygifインストール
go get github.com/sugyan/ttygif
録画
録画準備
作業ディレクトリ作成します。
mkdir recdata cd recdata
この作業ディレクトリrecdata
に録画データが保存されます。
録画
いよいよ録画です。
ttyrec rec1
Ctrl+D
で録画が終了します。
録画終了後、rec1
というデータが出来ていれば成功です。
gif化
先ほどの録画データrec1
をアニメーションgif化します。
ttygif -in rec1 -out rec1.gif
先程同様カレントディレクトリにrec1.gif
が出来ていれば成功です。
ttygifオプション
ttygif -in <input file> -out <output file> -s <speed> -noloop <bool>
in: ttyrec file (default: "ttyrecord")
out: output animated GIF file name (default: "tty.gif")
s: play speed (default: 1.0)
noloop: play only once (default: false)