asciinema is a free and open source solution for recording terminal sessions and sharing them on the web.
In the guide, you’ll learn:
- How to install asciinema from source
- How to record a terminal session using asciinema
- How to play a asciinema recording
- How to convert asciinema recording to a gif
- How to install ascii2gif docker image.
Installing asciinema on Windows
On windows you'll have to install windows subystem then install a linux distro such as ubuntu then run then follow the asciinema recording below.
Recording and replaying a terminal session using asciinema
First you need to know how to install docker. Once docker is installed you'll need to install the ascii2gif docker image.
How to convert an asciinema recording to a gif image
#!/bin/bashdocker run --rm -v $PWD:/data asciinema/asciicast2gif -s 4 -t monokai $1 $2.gif#make the ascii2gif.sh executable#end of script
bash -x ascii2gif.sh ascii_recording.json gif_out
Common Bugs Found During Conversion is the following.
When you come across a failed conversion try to increase the "-s" line within the script to a higher value for example from 2 to 5.
The error is most likely because all available RAM has been consumed. Therfore, try to increase the interval time to a higher value.
No comments:
Post a Comment