10 ms·
GIF for CLI
- lainga 8y agoIs 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?
- Sir_Cmpwn 8y agoIt's entirely possible to write a GIF to the framebuffer (setting aside that the framebuffer is deprecated in favor of KMS+DRM) without implicating X11.
- lainga 8y agoIs it (or DRM) safe over an SSH connection?
- gknoy 8y agoIf 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 8y agoSee 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 8y agoSlick :D Thanks for pointing that out!
- laumars 8y agoIt's not standard, but there are other terms with their own custom escape codes such as Terminology (from Enlightenment DE) and Kitty (not to be confused with KiTTY, the fork of PuTTY). There is also the sixel escape sequences will render using 6 pixel character blocks and is supported in xterm with the vt250 (iirc) support enabled. For what it's worth, xterm also supports vector graphics if you enable the right kind of VT mode. But that's a whole other discussion :)
- gue5t 8y ago$ mpv --vo=drm *.gif
- digi_owl 8y agoOr we could try using sixel... https://en.wikipedia.org/wiki/Sixel https://en.wikipedia.org/wiki/Sixel
- Sir_Cmpwn 8y agoSee 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
- m0shen 8y agoMy version written in go: https://github.com/moshen/gotermimg https://github.com/moshen/gotermimg
- digi_owl 8y agoOr if we go even deeper down the rabbit hole: https://en.wikipedia.org/wiki/Sixel https://en.wikipedia.org/wiki/Sixel
- flanbiscuit 8y ago"libcaca"... interesting name looks like they are keeping with theme: https://github.com/cacalabs/toilet https://github.com/cacalabs/toilet
- twic 8y agoOr the even more venerable (i think) aalib: http://aa-project.sourceforge.net/ http://aa-project.sourceforge.net/
- asdfman123 8y agoMy god. I think programming as a profession has now jumped the shark.
- kleiba 8y agoI literally have no idea what that comment is supposed to mean?!
- sp332 8y agohttps://en.wikipedia.org/wiki/Jumping_the_shark https://en.wikipedia.org/wiki/Jumping_the_shark
- philsnow 8y agowhich was reprised in an episode of arrested development where Henry Winkler (who played Fonzie in Happy Days) jumps over a shark on a dock: https://i.imgur.com/uHPHW0c.gif https://i.imgur.com/uHPHW0c.gif
- jethro_tell 8y agoWhy 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 8y agoI'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 8y ago"CLI wizadry" is trendy?
- oh_sigh 8y agoYou can also do this easily with mplayer: mplayer -vo caca ~/my.gif
- digi_owl 8y agonote that the heavy lifting there is done by libcaca...
- pwaivers 8y agoExcellent choice for the example GIF. Haha.
- cs702 8y agoOf course. Love the little note at the end: "This is not a supported Google product."
- deleted 8y ago[deleted]
- amenod 8y agoActually it says: Disclaimer This is not an officially supported Google product. Besides, what does it matter? It's a nice hack, but that's it. Noone will play Netflix over it... well, probably.
- saagarjha 8y agoIt's probably someone's 20% project.
- q3k 8y agoI 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).
- hapapa 8y agoSorry to be wearing my tin-foil hat here, but I wonder how much of this is actually an advertisement for Tenor?
- marzell 8y agoAh, this reminds me of fond memories of watching The Matrix converted to ASCII.
- chinathrow 8y agoCan someone shine some light on how Tenor makes money?
- ediardo 8y ago¯\_(ツ)_/¯ well, they were acquired by google...
- esimov 8y agoI made something similar in Go. https://github.com/esimov/gifter https://github.com/esimov/gifter
- jwilk 8y agoIt should be "CLI for GIF" or "GIF CLI" or "GIF for terminal". "GIF for CLI" doesn't make sense.
- deleted 8y ago[deleted]
- cup-of-tea 8y agoStop calling text based graphics CLI! Grrr
- kotajacob 8y agoLibsixel 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/
- mchahn 8y agoWhy are the results so dark?
- daleroberts 8y agoIf 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