Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nice. Reminds of the ANSI Art I would see on a BBS back in the day. Is there a way to export the art so that it could be printed in the Terminal. Would love to add some art to some scripts


I have worked on libraries for images in terminals [https://github.com/fenwick67/term-px] but I never thought to make a simple image import / export tool so you could just `cat` the file to show it in a terminal. Now you gave me a weekend project.


There's already a few out there that does this. I use pixterm in one of my own projects:

http://github.com/eliukblau/pixterm


For those playing at home, I just made this work:

https://codepen.io/fenwick/full/oGVQNX/


It might be worth using the none standard but we'll supported true colour ANSI escape sequences. You'll get much better output that way (I've done lots of experimenting with images in the terminal and I found that gave me the best output and more reliably then the other ANSI hacks that are limited to only supporting one specific terminal emulator)


This is great! I will go ahead and write a similar export function for vixl44.


Wow, cool project! If you want to collaborate on vixl44 for the feature to export something terminal-printable, feel free to do so


Thanks! Beautifying scripts is a usecase that didn't come to my mind so far. Awesome idea, I don't know why I didn't think about it! So far it is only possible to write your image to a file (which is just some json) or to export to svg, but it shouldn't be much trouble to get something which can be printed to terminal!


You should totally make a GitHub issue for that feature suggestion.


Hey just FYI: This is now possible with :exp FILENAME.ansi which dumps the corresponding ANSI escape sequences to a file




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: