Summer is coming and I've got a couple of posts cooking that may turn out mildly interesting, but — time constraints being what they are — in the meantime there's this.
Chafa
I (judiciously, as one might opine) pulled back from posting about every single feature release, but things have kept plodding along in quiet. ImageMagick is finally going away as per a buried remark from 2020, which means no more filling up /tmp, no more spawning Inkscape to read in SVGs, and so on. There's also lots of convenience and robustness and whatnot. Go read the release notes.
As for eye candy, I guess the new 16/8-color mode qualifies. It's the good old "eight colors, but bold attribute makes foreground bright" trick, which requires a bit of special handling since the quantization step must apply two different palettes.
With this working, the road to ANSI art scene Naraka nirvana is short: Select code points present in your favorite IBM code page, strip newlines (only if your output is 80 columns wide), and convert Chafa's Unicode output to the target code page. You'll get a file worthy of the .ANS extension and perhaps a utility like Ansilove (to those who care: There's some mildly NSFW art in their Examples section. Definitely don't look at it. You've been warned).
Taken together, it goes something like this:
$ chafa -f symbol -c 16/8 -s 80 -w 9 --font-ratio 1 --color-space din99d \
--symbols space+solid+half+stipple+ascii they_wont.jpg | tr -d \\n | \
iconv -c -f utf8 -t cp437 > they_wont.ans
$ ansilove -f 80x50 -r they_wont.ans -o top_notch_blog_fodder.png
It's a bit of a screenful, but should get better once I get around to implementing presets.
Finally, I added a new internal symbol range for Latin scripts. It's got about 350 new symbols to work with on top of the ASCII that was already there. Example anim below; might be a good idea to open this one in a separate tab, as browser scaling kind of ruins it.
Thanks
Apart from the packagers, who are excellent but too numerous to list for fear of leaving anyone out, this time I'd like to thank Lionel Dricot aka Ploum for lots of good feedback. He develops a text mode offline-first browser for Gemini, Gopher, Spartan and the web called Offpunk, and you should check it out.
One more. When huntr.dev came onto my radar for the first time this spring, I admit to being a little bit skeptical. However, they've been a great help, and every interaction I've had with both staff and researchers has been professional, pleasant and highly effective. Big thumbs up. I've more thoughts on this, probably enough for a post of its own. Eventually.
A propos
I came across Aaron A. Reed's project 50 Years of Text Games a while back (via Emily Short's blog, I suspect), and have been following it with interest. He launched his kickstarter this week and is knocking it out of the park. The selection is a tad heavy on story/IF games (quoth the neckbeard, "grumble grumble, Empire, ZZT, grumble"), but it's really no complaint considering the effort that obviously went into this.
Seems low-risk too (the draft articles are already written and available to read), but I have a 75% miss rate on projects I've backed, so what do I know. Maybe next year it'll be 60%.
Dear hpj,
any updates regarding sixel support in vte (which is chafa related)? I know you already invested quite a lot …
best, juergen
I haven't given up on it. There are a few issues on GitLab that require someone to make a decision, and then there is a fairly big chunk of work outstanding in achieving infinite scroll for images (a sort of swap implementation in user space).
My original plan was to keep it simple, with images in a memory FIFO buffer with a max size — the way it works now — but upstream is more ambitious. There are a few other nits to pick, like how the selection looks and what the replacement character should be when you try to copy image cells to the clipboard. There may be other requirements too before it can be enabled by default.
I'd say it's already a pretty good implementation, or at least it was two years ago. It's probably not the most conformant out there, but it's fast and covers many typical use cases (vifm viewer, the Gnuplot sixel backend, etc).
If you have more questions, I'll gladly try to answer them. Just send me an e-mail 🙂
Thanks for the Chafa update. Much appreciated!
If you are interested in GNOME and sound, check out
Radio at wiki.gnome.org/Apps/Radio
Gingerblue at wiki.gnome.org/Apps/Gingerblue
Voice at wiki.gnome.org/Apps/Voice
Hey, Ole. Nice apps!
I’m really glad (and proud) that our discussions were helpful. Through Offpunk, I use chafa tenths times a day and I’m always thankful for it. Thanks for your work!
❤️