diff --git a/README.md b/README.md new file mode 100644 index 0000000..1c5366f --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +# term2gif + +term2gif is 2 docker image : + +* First to asciinema : free and open source solution for recording terminal sessions and sharing them on the web. + +* Second to agg : agg is a command-line tool for generating animated GIF files from asciicast v2 files produced by asciinema terminal recorder. + +# Build + +```bash +$ docker build . -t term2gif-run -f Dockerfile.asciinema +``` + +```bash +$ docker build . -t term2gif-gif -f Dockerfile.agg +``` + +# images + +term2gif-gif & term2gif-run are avaible on docker.tuxme.net if you have an account + +# Script + +```bash +👾┌─[:(]─[22:33:01]─[guillaume@virgile]─[~/data/git/term2gif] +└──> ./term2gif +./term2gif [Path To File] +Ex : ./term2gif /home/guillaume/File.cast +.cast extension is mandatory +``` + +# Exemple + +```bash +👽┌─[22:33:02]─[guillaume@virgile]─[~/data/git/term2gif] +└──> ./term2gif ${HOME}/MyFirstGif.cast +asciinema: recording asciicast to /data/MyFirstGif.cast +asciinema: press or type "exit" when you're done +root@MyFirstGif:~# echo Now i am recording +Now i am recording +root@MyFirstGif:~# echo ciao +ciao +root@MyFirstGif:~# exit +exit +asciinema: recording finished +asciinema: asciicast saved to /data/MyFirstGif.cast +49 / 49 [=====================================================================================] 100.00 % 14.00/s +################################################## +cast file : /home/guillaume/MyFirstGif.cast +cast file : /home/guillaume/MyFirstGif.gif +################################################## + +``` + +# Exmple Gif + +![Exemple](./sample/MyFirstGif.gif "Sample Exemple") + + diff --git a/sample/MyFirstGif.cast b/sample/MyFirstGif.cast new file mode 100644 index 0000000..5d0e7b3 --- /dev/null +++ b/sample/MyFirstGif.cast @@ -0,0 +1,58 @@ +{"version": 2, "width": 113, "height": 70, "timestamp": 1695760418, "env": {"SHELL": "/bin/bash", "TERM": "xterm"}} +[0.011381, "o", "\u001b]0;root@MyFirstGif: ~\u0007root@MyFirstGif:~# "] +[1.359586, "o", "e"] +[1.506492, "o", "c"] +[1.529328, "o", "h"] +[1.599889, "o", "o"] +[1.669782, "o", " "] +[2.169741, "o", "N"] +[2.414488, "o", "o"] +[2.530485, "o", "w"] +[2.652371, "o", " "] +[3.235382, "o", "i"] +[3.383646, "o", " "] +[3.559458, "o", "a"] +[3.699574, "o", "m"] +[3.799777, "o", " "] +[3.990698, "o", "r"] +[4.029625, "o", "e"] +[4.288399, "o", "c"] +[4.41769, "o", "o"] +[4.530481, "o", "r"] +[4.600419, "o", "e"] +[5.114812, "o", "\b\u001b[K"] +[5.220409, "o", "d"] +[5.342388, "o", "i"] +[5.420687, "o", "n"] +[5.51039, "o", "g"] +[5.920573, "o", "\r\n"] +[5.92076, "o", "Now i am recording\r\n"] +[5.920872, "o", "\u001b]0;root@MyFirstGif: ~\u0007root@MyFirstGif:~# "] +[8.159743, "o", "c"] +[8.274277, "o", "i"] +[8.670603, "o", "\b\u001b[K"] +[8.836515, "o", "\b\u001b[K"] +[8.930517, "o", "e"] +[9.069623, "o", "c"] +[9.14046, "o", "h"] +[9.170396, "o", "o"] +[9.260377, "o", " "] +[9.47148, "o", "c"] +[9.575583, "o", "o"] +[9.600387, "o", "i"] +[9.710497, "o", "a"] +[9.957306, "o", "\b\u001b[K"] +[10.109556, "o", "\b\u001b[K"] +[10.26823, "o", "\b\u001b[K"] +[10.718112, "o", "i"] +[10.821327, "o", "a"] +[10.910362, "o", "o"] +[11.117396, "o", "\r\n"] +[11.117529, "o", "ciao\r\n"] +[11.117622, "o", "\u001b]0;root@MyFirstGif: ~\u0007root@MyFirstGif:~# "] +[11.283267, "o", "e"] +[11.486433, "o", "x"] +[11.741439, "o", "i"] +[11.978733, "o", "t"] +[12.222578, "o", "\r\n"] +[12.223179, "o", "exit\r\n"] diff --git a/sample/MyFirstGif.gif b/sample/MyFirstGif.gif new file mode 100644 index 0000000..a89ae75 Binary files /dev/null and b/sample/MyFirstGif.gif differ