Generate animated GIFs from asciinema terminal recordings.
The asciinema
tool is a wonderful way to record and share terminal sessions.
Unfortunately, it's not currently possible to embed the output in places like
README files on GitHub repos. This tool provides a solution for that.
Simply pass in the corresponding API url for the recording, e.g.
$ ./asciinema2gif https://asciinema.org/api/asciicasts/8332
An asciicast.gif
file will then be generated for you to embed and share.
The API url supports a few customisable parameters you might want to use:
?size=
:small
,medium
,big
?theme=
:tango
,solarized-dark
,solarized-light
PhantomJS 2
You need to have PhantomJS 2 installed since there are a number of bugs in
PhantomJS 1.x:
You can find relatively recent builds of PhantomJS 2 here:
Make sure to place the binary on your PATH
as phantomjs2
.
ImageMagick
OS X:
$ brew install imagemagick
Ubuntu:
$ apt-get install imagemagick
Gifsicle
OS X:
$ brew install gifsicle
Ubuntu:
$ apt-get install gifsicle
Public domain.
โ
Enjoy, tav <[email protected]>