
GIF for CLI - lainon
https://github.com/google/gif-for-cli
======
Sir_Cmpwn
See also the venerable libcaca:
[https://github.com/cacalabs/libcaca](https://github.com/cacalabs/libcaca)

Demo:
[https://asciinema.org/a/kjsWPMv5qtn87IHRd4th3EuNB](https://asciinema.org/a/kjsWPMv5qtn87IHRd4th3EuNB)

~~~
digi_owl
Or if we go even deeper down the rabbit hole:

[https://en.wikipedia.org/wiki/Sixel](https://en.wikipedia.org/wiki/Sixel)

------
esimov
I made something similar in Go.
[https://github.com/esimov/gifter](https://github.com/esimov/gifter)

------
cs702
Of course.

Love the little note at the end:

"This is not a supported Google product."

~~~
saagarjha
It's probably someone's 20% project.

~~~
q3k
I don't think you could get your manager to approve that as a 20% project.

More likely, it's someone's personal project they worked on in their spare
time, but it still belongs to Google (because everything does, according to
most engineering contracts there).

~~~
saagarjha
> everything does, according to most engineering contracts there

Most of the contracts I've heard about only transfer ownership if you use
company resources to work on it. Any project done in your free time, with your
own resources, belongs to you.

~~~
q3k
Not at Google.

------
jwilk
It should be "CLI for GIF" or "GIF CLI" or "GIF for terminal".

"GIF for CLI" doesn't make sense.

------
daleroberts
If you like this project then you might like these ones.

Image visualisation in terminal using Unicode 9 and True Color:

[https://github.com/daleroberts/tv](https://github.com/daleroberts/tv)

Image visualisation for iTerm2:

[https://github.com/daleroberts/bv](https://github.com/daleroberts/bv)

Matplotlib graphics and animation in iTerm2:

[https://github.com/daleroberts/itermplot](https://github.com/daleroberts/itermplot)

------
lainga
Is it possible to do something like this, but writing the actual GIF to the
host's framebuffer (/dev/fb*)? Or are we getting into X11 territory?

~~~
gknoy
If you use a Mac, the Iterm2 terminal emulator has an additional protocol that
supports rendering images [0]. It basically encodes the image with terminal
escape sequences, and also works for animated gifs.

Unfortunately, it seems to not be a standard - it would be neat if there were
such a standard, and if other terminals could/would do similarly. It seems
like the silliest thing but I like being able to easily indicate when my tests
fail or not:

    
    
        alias SUCCESS="echo -e '\n\nSUCCESS' \
            && imgcat ~/Pictures/success-100.png \
            || imgcat ~/Pictures/fail-100.png"
    
        make test && SUCCESS
    
    

0: [https://www.iterm2.com/documentation-
images.html](https://www.iterm2.com/documentation-images.html)

~~~
aumerle
See [https://sw.kovidgoyal.net/kitty/graphics-
protocol.html](https://sw.kovidgoyal.net/kitty/graphics-protocol.html) for a
much more comprehensive terminal graphics protocol

~~~
gknoy
Slick :D Thanks for pointing that out!

------
kotajacob
Libsixel is also pretty sweet. You can even integrate it with sdl and all
kinds of crazy shit.

[https://github.com/saitoha/libsixel/](https://github.com/saitoha/libsixel/)

------
marzell
Ah, this reminds me of fond memories of watching The Matrix converted to
ASCII.

------
oh_sigh
You can also do this easily with mplayer: mplayer -vo caca ~/my.gif

~~~
digi_owl
note that the heavy lifting there is done by libcaca...

------
chinathrow
Can someone shine some light on how Tenor makes money?

~~~
ediardo
¯\\_(ツ)_/¯

well, they were acquired by google...

------
cup-of-tea
Stop calling text based graphics CLI! Grrr

------
pwaivers
Excellent choice for the example GIF. Haha.

------
mchahn
Why are the results so dark?

------
asdfman123
My god.

I think programming as a profession has now jumped the shark.

~~~
jethro_tell
Why do you think that? Is it because you personally find no value in this
project? If you don't understand what the value of this project would be then
it's not for you but that doesn't mean it has no value. Also, computer science
and programming are built on the two mule team of 'because we need it' and
'because we can!' This is nothing new.

~~~
asdfman123
I'm mainly just joking, because it's combining two things that are trendy:
GIFs in everything and CLI wizardry.

No real criticism of this software. If I had thought of it first I might have
built it myself.

~~~
OJFord
"CLI wizadry" is trendy?

~~~
SeriousM
Kind of, yes. More and more products and services are going to offer cli
clients. Angular, vue, Azure, kubernetes, docker, choose your weapon.

~~~
jethro_tell
That's been the norm since the 80's, not sure what's new about that.

~~~
yjftsjthsd-h
The industry is, to a degree, cyclical and prone to fashions; CLI was
everything in the 80s, then went out of style in many circles in the 90s and
00s, and now is coming back into style in more circles. And with each new wave
we get new variations and fun things as new people hit the old ideas with new
perspectives:)

