Open keegancsmith opened 6 years ago
Yesterday I've been playing around with imgcat
. It seems really easy to integrate in non-interactive interfaces or interactive interfaces that use the native ANSI escape codes of the terminal. Urwid is a bit specific. As long as I've searched, a custom widget using escape codes would need to use the urwid.Terminal
widget as base, which provides its own parser for ANSI escapes, so buffering the output of imgcat and unbuffering inside a Urwid box doesn't render things like they should. I'll take a deeper look in the protocol the check the possibilities.
You might want to checkout tiv https://github.com/stefanhaustein/TerminalImageViewer. I think its output looks better than imgcat's
iTerm2 has extended the xterm protocol to support embedding images in the terminal. This seems like a great use in sclack if supported, instead of ANSI/VT100 rendering. https://www.iterm2.com/documentation-images.html