I’d wanted to extract the code I used in the those projects into a stand-alone project/component that could be added to an existing page where ANSI escape sequences need to be interpreted. I’ve toyed with the idea of making it a Web Component or something like that but haven’t just yet.
Continue reading “terminal-preview”
I’ve been working on cleaning up my dotfiles recently and have been playing with my
PS1 and the available colours. In doing so I thought it might be interesting to extract image data from an uploaded image and turn the result into a nearest-match
ANSI image. This is the result! It supports both 256 colour and true colour terminals and can utilise unicode code points to present a clear image in slightly fewer pixels as well as just using background colours and spaces if preferred.
It includes a live preview which I’ve lifted from the bash
Check it out here!