4 ms·
Printing images in the terminal with 9 lines of Ruby
- donatj 11y agoThat's neat but I'm sure those gems are far more than 9 lines. I was expecting something more like: https://donatstudios.com/Damn-Simple-PHP-ASCII-Art-Generator https://donatstudios.com/Damn-Simple-PHP-ASCII-Art-Generator
- astro- 11y agoYou're absolutely right. I was trying to showcase what can be easily done with things that are there. And in particular the possibility to use RGB directly in the terminal. Really like your ASCII art generator, by the way!
- vezzy-fnord 11y agoI've always thought the fact that our modern VTEs still being stuck in pure text mode is a regression. We've already settled on terminal control being VT-100 (or more accurately ANSI sequences). Given experience from prior windowing systems like rio and Oberon, why isn't it standard fare to have programmable text, built-in text processing in terminal windows and bitmap images? TUIs are only the tip of the iceberg, and the inclusion of aforementioned features would obsolete plenty of use cases for GUIs, along with making a lot of task automation so much easier. Application launchers and things like "let me hack a quick script to do a processing job" then become unnecessary.
- nine_k 11y agoThe above has been tried in mid-1990s, with some success, then suddenly exploded, and now we ended up with HTML5 + CSS3.
- vezzy-fnord 11y agoNo, the web is nothing like what I had in mind.
- thomasfl 11y agoIt's scripts like this that makes programming fun.
- thomasfl 11y agoIt's scripts like this that makes programming fun.
- betandr 11y agoReally like this! Merging text with a png to render to the terminal could be the future of cowsay! ;)
- MattBearman 11y agoVery cool! Did you specifically choose RMagick over MiniMagick?
- astro- 11y agoThanks! No, it was the one that came up first on Google I guess. Since all that I'm using is change_geometry and resize! I might switch it over to something more lightweight. Made a note here: https://github.com/pazdera/catpix/issues/1 https://github.com/pazdera/catpix/issues/1 Thanks for the suggestion, Matt!
- tremendo 11y ago"This is not the Star Trek actor you're looking for…" (Patrick Stewart /Capt. Picard, not Leonard Nimoy /Spock). Love the script BTW, great work.
- astro- 11y agoWhoops. Thanks for pointing it out! I fixed it right away, sorry about that.