Using ttyrec
I can record any console program (ttyrec
invokes a shell and records the session until the shell exits). The record is saved by default in a ttyrecord
file and can be played using ttyplay ttyrecord
command.
Now, I want to convert this ttyrecord
file in a .gif
file. I found this phyton script (tty2gif.py), but, no matter how I do, I can not manage to make it to work...
Any other solutions will be appreciated!
I couldn't get tty2gif to work with vim so I hacked together ttygif.
more detailed instructions can be found in the project readme.
Ok I have ran a test with the
tty2gif
script that you mentioned on your question and I -somehow- succeeded getting the gif animation as shown in the next screenshot:I needed to install python-opster in order to make the script work without a problem, otherwise you may receive a "
Line 7 Error
" message when running the script from the terminal. Then simplysudo apt-get install python-opster
in the terminal, provide your user password and get the complement installed.Now, if you run the script with no parameters you'll see the options as shown in the next screenshot:
We'll send the script's command with the "typing" option in order to get the individual gif shots as follows:
This will reproduce your keypresses in the terminal and will get an individual screenshot for each iteration. Which will result in several gif images in the folder, the images will be named "step???.gif" as seen in the next screenshot:
Now, we will use the convert command from the Imagemagick package in order to drop the next line in the terminal so that we can get a one-file gif animation made from these
step???.gif
image files, as follows:Please note that I am using *.gif having in mind that there are no other .gif files in the same folder, otherwise they may be merged in the resulting animation.
Here you can change the
-delay
and the-loop
parameters, the same as the resulting filename.You can also import these
step???.gif
files in gimp or any other image manipulation program in order to make a better (optimized) gif animation which will result in a smaller file size.Please let us know if you succeed with this workaround or if you are experiencing a different kind of an issue, don't hesitate to let us know also.
Good luck!