Open slarrain opened 2 years ago
This functionality of some terminals basically works by sending special ANSI escape messages to the terminal that contain the image data.
In whatscli, currently the output of the image display command is parsed for ANSI messages to convert the colors to tview
colors for the message display window. See https://github.com/normen/whatscli/blob/ae25296b9d47087af72e561ce80a8382e9dbf7cc/main.go#L567
The tview
widgets themselves do not seem to support this kind of ANSI message, when I use iTerm2's imgcat
tool and remove the ANSI conversion in the code above I still only get the raw data instead of the image. So you'd have to find a way to directly send these to the terminal and at the same time make sure its anchored in the tview
text widget. Not sure if and how this is possible
The way this should be implemented for the user is by adding an option like CommandRawAnsi
and based on that decide how to handle the image view command output.
A PR is welcome but I don't think I'll start working on this personally.
Given that more and more WhatsApp conversations are filled with images or GIFs, I would like to request a feature that would allow the user to be able to see the images on the terminal, inline.
This is different than ASCII support, because:
s
nor navigate to the message to show the image.What I am thinking is pretty much the same functionality that was implemented with this PR on Rainbowstream (it even has screenshots). I know in Python it would not be hard to implement, but in
Go
I have n idea how hard it would be. I hope is doable.Thanks!