Thursday·26·March·2020
Pictures in pure HTML with chafa and aha //at 05:55 //by abe
I recently stumbled upon chafa, a tool to display pictures, especially color pictures on your ANSI text terminal, e.g. inside an xterm.
And I occasionally use aha, the Ansi HTML Adapter to convert a colorful terminal content into HTML to show off terminal screenshots without the requirement of a picture — so that it also works in e.g. text browsers or for blinds.
Combining chafa and aha: Examples
A moment ago I had the thought what would happen if I feed the output
of chafa
into aha
and expected nothing
really usable. But I was surprised by the quality of the outcome.

looks like this after chafa -w 9 -c full -s 160x50 DSCN4692.jpg
| aha -n
:
▆▅▆▃▆▃⎽⎺▄▆▄▂▅▄━▄━▂⎽▆▘▂▍▝■▌▆▘▚▄▂▄╸▂╲▌▄▚▅▶▄⎺▅▄▃▃▮▗▆▃▅▂▅━▃▆▃▃▂▌▆▮┛┷▅⎽⎻┛▚▅⎺▅●▚▋▋▘▃⎽⎺╱■▄▚▊▄▎⎺▄▗▂▄▂▅▆▃▅■▃▅▂▆▄▂⎽▍▄▃▅╲▅▄▖╱╸▖▘▂▼●▋▅⎽▚▃⎽⎺▅▂▅▃▅▆ ┻⎺⎽╸⎺▅▃▅▂▆▆▃▅▃▂▅▃▃⎺■⎺▃⎽▅▝▂━▚▃●▄▅▶▆▖╸⎺▋━▆▆┍▂●╱▅━▄▆▍⎺▅▃▄▂▄▅▃▅▃▂▂⎺▮▗╸▃⎻━╸▂▶▝▂▝▖▖▝▗▘▆▂▘▄▅▘▗▆▃╸▆▃▍▂▝▅⎺▆▃▄■▃▅▂▆▄▂▝▖▄▅▆▂▅▝▖▄▃▖▃▆▚●▃⎽▖▝▗▃⎺▃⎺▄ ⎺▄▃━▂▗▖⎺▅▂▄▂▄▅▂▄▃▆▅▖▚▗▃╸⎺▖⎺▗▝▂▂▅▃▄▖▆╺▄╲╾▃▚▃▝╸▂▲▂▄■▂▘▊▆▅▆▄■▃▅▂▅▂▃▃▄■▚▅▮▃▃▅●▅⎺▍▆⎺━▃▖╺▖⎺━┓▲▘┛▗▅▌▎╲▌╱▝▄▚▅▆▄▆▃▄▂▅▃▂▝▖⎺▅▝▅▄▂▃▖▆▃▖◼▃▚╾▘⎼▗▃▂⎽ ▃▃▂╺▘╼▝▂▃▂▆▄▆▃⎽▄▄▆▃▂▂╾▆▘▃▄▄▄╾▍▲▃▄▃▂╺▖▃▃▋▄▃◀▅▘▂▅━▘▅●▖╾▃▆⎺▆▄▆▃▆━▄■▄▃⎽▃┚⎼▆▄▚▂╴▖▅▂▗▶▃┙▘▅▂⎼▃▄▅╱▝▄▌┺╍▖▅●▄┙▍▅⎺▅▆▃▅▂▄▂▆▄▃▂▶▂⎽▃▅▄▂▝╸▖▅▌▖┛▅▖▆▃▄ ▝⎽▝▃▶▅╱⎼▃▄▂╱▅▅▂▅▂▆▆▃▅▃▖▌▄▄▂●╸╴▝▗▄━▖▖⎼▆┖▗▃┗▄▲┖╾⎺▆·▃╲▂▂╲▅▃▚▅⎺▆▄▅▃▅╾▃▆▃▃▃▄▖▃▄▃▂╸╴━▚▄■▅▆⎼┒▅⎼▆▃⎽▖╸▖╸▋▃▝▃▝▂▃▄▄▂▆▄▆▃▅▂▄▂▅▃⎽▆▂▅▆▝▗▃▂╺╼▄▖┍▍▊▌▝ ▄╺▘▲▆━▘┒▗▍▝▮▅▚▖▆▅■▄▂▄▅▂▄▂▃▃┗▂⎽▄▝▆╺▅▅▋╺▃▃▆▖╲▝▂▂▄▃▄⎺▂⎺▂╸▚▂▚▝▄▗▅⎺▅▂▄▂▄▅▂▅▂▃⎽▗▘▋╺▝▄·▄╱╸╸▍▂▃▄┰▂▎▃▂▚▅┎┎╸▂▋▅▘⎼▅◼▃▝▚▆▃▅▂▅▂▄▂▅▃▂▅▄▆▄▅▖▃▌■▄▖▝╲▅ ╸▃╱▗▄⎺╺▅▗▖▄▌━▖╾▚▂▆▆▄▆▄▚▘▄■▃▖▝▃▆▗▄▘▝▅━▖▗╺▃⎽⎼▖┭▃▄▅■▃▚▝┱╺▆■▖▂╲▅▖▊▆▃⎺▅▆▄■▃▄▂▅▃▂▝▚▖╱▄╴┛▊▄▄▂▃▂▗▖▆╾▝━▂╱━·┓┺┑⎽▌▄▃▘⎺▆▂▝⎺▆⎺▄▂▅▂▃▂▅▃▅■▂▅▖▖━▄▂┗▝■ ▋▂╼╹▅╼┏▃▃⎻▃▗▆⎼▅▚▃╸▖╸▝▅▃▅▂▆▆▃▅▃⎽▄╸▅▘┙▘▘▘▄▖▄▝▅▄╺▖▆▆▃▅▂⎽▲▘▅━▆▅▝▖▃▝╺╸▖▃▆▄▆▃▆▃▄━▄▃▖⎻╾▄▃▅▃▄▄▄▆▅▅▃━·▅▘╸▆⎼▂╴▆▆■▝┑▋▄▅▼╸▅▅▃⎺▅▆▄●▄╾▃⎽▅▖╾▝▂▃▅┗▄▝▅ ▝▅◼▂▆━▝▎▎╸▖▖▖▄▃⎽▝▃▝▖▆▂▂⎺▄●▄▂▅▅▂▄▂⎽▖▄▗▃▃⎽▅■▖▖▅⎺▃▚▘┒▂▂■▃▚╺▌▄▃▅▂■▃▂▖▆■▄▃⎺▆▃▅▃▅■▃▆▃▂▂▅┓▄⎻▍⎽─▄▖┎━▆▆▆▅▆▂▼┳▆▚▆▆▃╸▗◆┳▃▂▊▅▚◀▆⎺▅▆▘⎽▆▄▂▆▄▂▄▄▘▄◀▃ ▃▌▝╸▅▆▄▖⎻▗┳·▆▚▆▃▅▖▗▝▂▝▂▅⎻⎺▆▄▆▃▚▄▄■▄▂▂▆▖▂▅▅▆╸⎺▍▃■━▅▗▖▄▃▃╾▖▄▂▗▘▘⎺▅▃▄▝╺▅▃▲▌▝▆⎺▄▂▄▅▃▅▃▂▚▘▃▆▃▂▖▚⎼▃▃◼▘╼╺▂⎻▚▄┗▅▆▄▅▄▅▗┍▃▃╸▃▃▗▅▄▆▄▄▃⎺▆▄▂▅▃▂▆▃▃ ▝▍▌╱┗▗▅▃▗▃▄▼▆▖▘▂▆▆▘▂▘▝⎻▆▃▆▅▄▝▆▃▅▃▆▃▄▆▃▖▖▅▄▂▃▍▍▂▖╺▂▄▆■▅▗▂▆▅▝▚▃━▅▚▅▝▅▂⎽╲▃▃▃▅▖⎺▅▆▄■▃▅▂▅▂▖▝▆▆┗┒⎺▃▄⎽▗▝▘▂▝▅▅▃▅⎺⎼▄▄▄▂▝╸◀▆▅▖━▃┓▆▂▂▆▄▄▂⎺▆▄▂▃▃⎽ ▂╾▃·▅▚▖▖▅▝▂▂▌▆╾▝▄▃▄■▍▘▖▅▝▂⎽▆▆▆⎺⎺▅●▄▂▆▅▃▅▃▖▚■▃▃▄⎽⎽▅▃▖▖▗▄▚▃▗▆▅▃▂▆▄▋▂▄▂▂▅▃▄▃▆▅▄▌▃▆▄▅▃▆▃▄▆▄▂▄⎺▂⎺▃╾▲■▆⎺▅▂▂⎺▃▂⎽▃▃▆▆▆▝▖╺▎▂▃⎺▍╸●▆▆▆▅▚▆▄▄▃⎺▅▃▂ ▼▚▂▖╸▆╲▄⎺▌▆▂▖▃⎽▄◼▗╺▃▅▊▃▃▘▝▗╸▂▚▗▃▮⎺⎺▄▆▃⎽▅▄▂▅▃▗⎽▆▃⎽▆▅▂╹▊┗▆▅▄⎽●▅▄▃━▚▅▆▅▄▗▍⎽▄▃▃⎺▆▅▄▃▝▅⎺▅▂▅▂▃▆▄▂▄▆━▗▂▄▂▂▅⎺▂▘▃▄▃▄▄▅▅▆▆▆▅▝▘▍▂▄▃▃▃▗▂▝▄▅⎺▅▄▄▂⎺ ▄▂▖▄━╾◀▅▂▝▋╺▝▘▃⎽▃●⎻⎺▅▆▃▅▄▆▖╏▅▗▂▌┺▆▄▃⎺▆▃▅▂▆▃▂⎺▄▂▄▆▅▃▂▅▃◀▝▆▅⎽▂▅▆┳▃▅▄▃▄▄▃⎽▗▄▂▄▄▄▃▘╺▆▄▃━▅⎺▄▂▄▂▂▆▃▂▗▂▄▆▄▝⎽▝▅⎺▃▘▘▄▅╲╺▂⎽▆▌▃▄▅▄▆▃▂⎽▂▅▅━▅▃▃⎺▅▄ ▅▃▅▃⎽▍▆▝▝▘▘▖╺▖▖▄▆⎽▗▅▄▶▂▃▅▅▄▂▄▂▃▃▆▂▂▃▄▃▂⎺▅⎺▄▂▆▃▂▆▃▖⎺▃▅▅▃▂▂▃▌▃▃▄▅▂╍▗▅▆▄▂▅▅▃▃▆▃▃▆━▃▄▃⎽⎺▅▅⎺▅▆▃■▄⎽▂▂▝▖▘▃▅▄▂▅▅▆▄▅▄▅▆▄▆▄▄▘▅▅▄▃▅▄▄▂▄▂▃▂▆▆▆▅▃▃ ▃⎽▆▄▂▅▂⎽⎽▄▘▅▖▄▄▄⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽■⎽⎽▅⎽⎽⎽▂⎽▂▂⎽⎽⎽⎽⎽⎽▗▄▄▄⎽⎽⎽⎽⎽▂⎽▗▂▂⎽⎽⎽⎽⎽▂⎽▂▂▂▂▂▂▂⎽⎺▅▃▂▂▂▂▂▂▂▂▃▂▂▂▂▂▂▂▂▂▃▂▂▂▂▂▂▂▂▃▄▄▃▄▃▂▂▃▂▅▅▂ ▅▂▅▂▘▆▄⎺▆▆▆▆▆▖▆▌▍⎺⎺⎽⎺⎺▝▆▌▊▍⎽⎺⎺⎺⎺▅▋▍▎⎺⎽⎽⎽⎺▝▆▌▋▍▂▂▂⎺⎺▖▋▊▏▼▗▂▂⎺▌▋▝▌▍▊▂⎺▂⎺▎▌▉▎▘▗▂▗⎺▝▍▝▋▌▄▉▂▗▅▌▉▘▌▎▅▂▂⎽▆▍▝▊▎▏▗▃▃⎽▝▎▍▋▋▗▃▃▃▃▋▍▃▃▃▃▃▃▃▂▅▃▃▂▄ ▂▄▆▄■▄⎽▏╺▖▄▄▖▌▋▌▍▝▍⎺▌▏▋▌▌▋▎┗▘╲╱▉▎▋▍▎▅▌─╴▝▋▋▌▌▎▉▍┮▘▉▍▌▊▋▋▋▍⎺▖▋▋▎▍▎▝▝▗▆▊▍▌▊▎▌▋▎▌▎▉▎▋▋▍▊▉▋▌▍▌▎▊▍▎▋▍▋▍▉▍╿▊┃▏▊━▃▘▊▎▎▋▋▘┻━╸▗▋▎▄▆▅▆▄▂▆▆⎺▄▂▆▅ ▂■▆▃▆▅▃▏▂⎺⎺⎺▃▌▋▌▍▃⎺▅▅▆▋▌▌▋▎▝▘▝▘▉▎▋▍▎▂▝▅▅▂▋▋▌▌▎▅▘▝▘▗▎▋▋▋▂▎▆▂▃▌▋▎▍▎▂▝▆▃▊▎▌▊▎▂▘▆▆▄▊▍▋▋▍▂▉▆▅▃▌▎▊▌▎▂▆▆▆▂▍▖▋▎▂▝▆▝▅▊▎▍▌▋▆▆▆▆▆▋▎╸╲◀⎽▌▆▖▃⎽▆▖▋╾ ▖▆▃▘╺▅▊▎▆▆▂▃▂▝▌▋▍▃▃▂▂▂▘▌▋▋▃▂▂▂▂▂▌▋▉▏▂▂▂▂▂▘▌▌▍▃▃▂▂▂▂▌▋▋▃▃▃▂▂▂▌▋▉▝▃▃▃▂▃▂▌▌▋▃▃▃▃▃▃▂▌▊▝▃▃▃▃▃▃▌▎▋▃▃▃▃▃▃▃▍▉▝▄▄▄▃▃▃▃▍▊▝▄▃▃▃▃▃▘▍⎽▄▗▆⎺▅┙▆⎽▃▊▗▌ ▃▘▝╴▅▖▆▝▄▖▍▅▂▂▂▅┷▃▋▃▃▃▃▃▂▄▄▆▃▃▃▃▃▃▄▄▆▗▃▃▃▃▃▃▄▖▋▃▃▃▃▂▂▄▄▆▄▃▃▃▃▂▃⎻▗▗▃▃▃▃▂▂▄▗▂▗▃▃▃▃▂▂▂⎺▗▄▃▃▃▃▃▂⎻■▗▄▃▃▃▃▃▂⎻━▗▄▃▃▃▃▃▖■╺▄▃▃▃▃▃▃▖▖▆▂▅▃▌▂▆▖▝▆ ▮⎻╺▶▆▄▅▼▉▎▄⎽▖▝▖▋▌▌▋▎▍▗▖▖▊▎▌▉▋▖▗▃▖▄▌▋▌▍▏▗▃▃▖▊▎▌▋▍▌▗▄▘▌▌▋▎▎▏▊▄▄▚▉▎▍▋▌▌╻▍▃▖▋▍▊▋▎▌▌▉▖▌▌▎▊┃▅▗▂▃▖▊▎▅▋▋▝▗▏▌▋▊▎▊▌▍▌▉▋▎▍▋▎▊▍▎▝▌◆▎▖▌▎▝▂╸●▘▄▝▃▃▃ ▂·▄▄▝▲▖▅▊▎▊▍▂▼▍▋▋▌▌▏▗╱┶▖▊▎▌▉▌▍▍⎻▖▝▌▋▌▍▏▊▍▂▍▊▎▌▋▍▋▎⎻▖▃▌▋▉▎▏▊▂▍▎▉▎▍▋▍▊┃⎻┃▍▋▌▋▌▎▝▗▂▌▃▌▍▊┃▍▌▄▄▖▊▎╽▋▌▖▌▂▂⎽▊▎▊▌▍▖▉▖▋▍▋▎▊▍▎▋▗⎽▌▋▋▎▝▮▄▖▅▝━⎽▝▂ ▆▃▝▆▄▂▅▘▊▎▂⎽⎽⎽▝▌▋▌▌▃▂⎽▂⎺▊▎▋▊▝▂▂⎺▘▗▍▋▌▎▂⎽⎺⎺▍▊▎▌▋▝⎽⎽▍▝▃▍▋▉▎▂⎽⎺⎺▋▗▎▍▌▝⎽⎺⎽⎺⎽▋▌▊▌▖▂⎽⎺▆▃▌▎▊┠▃⎺▂⎺⎺▗▎◼▋▝▃⎺⎺⎺⎽▋▍▊▌▍▃▉▘▘⎽▌▍▋▍▍▂▝▘▌⎽▌▎▖·▍▚▄▃▌▘▃▅ ■▄◆╾▃⎽▅▅▊▎▂▃▃▄▄▃▌▌▍▄▃▃▃▃▃▂▋▊▃▃▃▃▃▃▃⎽▌▎▃▃▃▃▃▃▂▋▌▄▃▃▃▃▃▂▌▊▃▃▃▃▃▃▃▂▌▝▄▃▃▃▃▃▃▍▋▃▄▃▃▃▃▄▘▎▝▄▄▄▃▃▄▄▘▂▝▅▄▄▄▄▄▄▎▋▄▄▄▄▄▃▄▘▂▝▄▅▄▄▄▄▄▘▍▂▂▃▄▃▄▂▋▅⎽ ┕⎽▃━▆▅▝▖▝⎺⎺▖▆▆▆━━▆▆▆▊▆▅▄▄▄▃▆▆▆▗▆▅▅▄▄▆▆▆▋▅▅▅▄▄▃▆▆▄▆▅▄▄▄▃▃▆▌▌▅▄▄▄▄▃▖▗▅▗▄▄▄▄▃▃▆▆▖▅▄▄▄▄▃▖▆▅▗▄▄▄▄▄▃▖▆▄▗▄▄▄▄▄▃▖▆▖▅▄▄▄▄▄▃▖▅▖▄▄▄▄▄▄▃▖▂▗▄▘▋⎻▄▃ ▃▅▄▄▂▂▝▖▖▗▊▍⎽⎽⎽⎽⎽▋▋▌▋▎╺━▅╸▊▎▋▍▎▅╺▂▖╾▋▋▌▋▍▖▄━▖▆▍▋▉▎▄▗▖▗╸▊▋▍▋▍▅┏─▖▅▌▌▊▍▆▗▖▗▖▉▎▗▊▋▉▖▂▗▖▊▎▉▌▍▖╺╺▏▅▌▎▉▌▎▝▌▂▘▆▍⎻▊▍▎▄▋▘▌▉▍▍▋▊▂⎽⎽⎽⎽▖▎▅▅▄▖▅▅╺╸ ▮▗⎽⎽▃▅▚▂▄▝▊▎▃▄▄▘▝▋▋▌▌▏▗╱┷▖▊▏▋▉▏▋▗▄┓▖▋▋▌▌▎▝╲▄▖▗▎▋▊▏■▝╲▘▝▊▋▍▋▎▋▏■▎▄▌▌▊▍▏▋▆▖▎▉▎▎▊▋▉▗┳▖▎▊▎▊▌▍▝▉▂▅▂▌▎▉▌▎▝▊▂▖▝▍▎▊▍▎▝▗╺▖▂▍▎▋▊▄▄▄▝▄▘▎▂▂▆▅▄▂▂▂ ▊▝▲▂▃┓▘┙▖▆▊▎▄▃▃▃▗▌▖▌▌▄▄▃⎼⎼▊⎽▋▉▝▄▃▃▃▂▍▌▌▌▝▄▃⎼▂▗▎▋▊▮▄▃▃⎽▂▋▋▍▍▝▄▃⎼⎽▗▍▍▊▍▖▃⎼⎽▂▗▍▎▋▲▄▃▃⎽▂▋▍▊▌▌▄▄▆▂▂▍▎▊▘▍▄⎼⎺▂▂▍▍▗▍▎▄▆⎽⎽▂▍▄▌┗▄▄⎼⎽⎽▗▎⎽▆▄▃⎽▆▅▄ ▋▍·▝▃▅╶╲▝▂▝▃▂⎽▃▃━━▃▃▘▆▅▅▅▅▅▄▃▊▅▄▄▄▄▄▄▃▘▝▄▄▄▄▄▅▄▃▝▄▄▄▄▄▄▄▘▃▅▅▅▄▄▄▅▄▍▘▅▅▅▅▅▅▅▂▂▝▅▅▅▅▅▅▅▂▘▅▅▅▅▅▅▅▅▃▝▆▆▅▅▅▅▅▘▃▝▆▅▅▅▅▅▅▂▃▅▆▆▅▅▅▅▅▘▂▂▆▘▅▄▂⎺ ▂▍▝▃━╺▅▄▝⎼▅▗▘▌▆▅▅▅▅▅▖▋▊▆▆▆▆▅▅▖▋▌▍▆▅▅▅▅▄▖▋▊▆▅▅▅▅▅▖▋▘▍▆▅▅▅▅▄▍▘▊▆▅▅▅▅▅▅▅▅▅▅▅▅▅▅▄▖⎺▆▗▆▅▅▅▅▄▖▝▋▆▅▅▅▅▄▄▖▆▋▆▅▅▅▅▅▄▖▆▌▆▅▅▅▅▅▖⎺▝▗▅▅▅▅▅▅▖▎⎻⎻▌▝▅ ▄▅▂⎽╺▆▄▃▂▅▝▝▄▍▗▖▖▄▃▊▎▌▊▍▄▃▃▖▆▍▋▍▍▃▃▃▃▃▉▎▌▊▍▊▃▖▗▘▌▋▎▍▂▃▂▂▃▃▎▍▊▊▖▋▍▆▃▃▃▃▂▃▃▂▖▌▌▌▍▉▍▗▃▂▂▃▖▍▌▊┃▝▂▂⎽⎽▉▎▋▋▋▅▋▗⎽▋▊▎▍▋▍▂▗▅▖▌▋▎▊▌▍▊⎽▂⎽▍▋▎━▝▖▗▄ ▃⎽▅▆▄▂▃╼▅▃▍▄▘▍▆▘▘⎺▆▊▎▌▊▍▖▘▆▘▂▍▋▍▎▅▅▅▅▅▊▎▌▋▍▝▆▅▆▍▌▋▗▍▄▅▆▅▅▅▎▍▊▊▋▌▅▃▃▃▄▄▄▆▄▃▝▝▄▌▎▖▍▝▅▅▅▅▘▍▗▊▊▌▆▅⎺⎺▉▎▖▋▋▂▝▖▘▎▊▎▎▋▍▍⎺▶⎺▖▋▗▊▌▍▆▆▅▆▆▋▎▍▗▅▃▃ ▄▂▅▂▅▃▅▃▂▘▆▄▊▎━━━▂▃▋▂▝▋▌▅━▃▃▅▂▂▗▎▅▅▂▂▃▋▂▌▌▍▅━▂▂▄▍▝▗▍╸▘▂▂▃▅▍▂▃●▅━▂▂▂▂▂▂▂▂⎽⎽⎽▂▃▍▊▖▝╸▂▂▂▂▗▎▗▗▲▄▂▂▂▂▗▎▖▌▶▅▄▂▂▂▊▊▎▘▘▅─▂▂▂▋▗▃▘▌▄▂⎽▂▂▘▍▂▄▅▅▂ ▆▅▄▄▆▄⎽▅■▄▂⎺▆▝▅▄▄▄▄▄▄▃▄▄▄▄▄▄▄▄▃▃▄▃▃▃▃▃▃▃━▃▃▃▃▃▃▃▄▃▃▄▃▃▂▄▃▃▃━▃▄▄▄▄▄▄▄▃▃▄▄▄▄▄▄▄▄▄▃▃▃▃▄▃▄▃▄▝▃▃▃▃▃▃▂▂▂▃▂▄▄▄▄▄▄▄▃▃▃▄▄▄▄▄▄▄▝▃▄▄▄▄▄▄▄▄▅▆▅▅▃▃ ▃▃▄⎺▆▄▃▅▃▆▃▅▂⎽▅▂▗▃▂╺▄▝▄▝▘▝┗╍▃╲▗▂▼▅▅▗▆▅▅▄▃▘▆▅▄▆▶▃▆▆▄▂▄▖▄▆▃▅▃⎽▂▅▆▆▆╸▗▆▃▗▖╲▄■▄▘╲··▌▄▆┍■▗▗▄▍▆▆▆▃▆⎻⎺▆▄▃▃▂⎺▅▃▆▄⎽▅▅▄▂▃⎽▂▝▖▍◼▖▅━▆⎺▅▄╾▄▂▂▝▗┯▃■ ▚▄▆▅▅▆▼▅▄⎺▅▃▅■▄▂▃▝▄▃▆▃▊▚▋▃▗▂▃▲▂▄▌▗▖▚▖▄▄╲▃▍▆▃▗▅⎽▚▆▄▅▆▆▄▆▃▂▆▄▂▅▂⎽▚▖▘▅▂━▋■▃▘⎺▘▃╸▂▗▶▄▘⎺╺▝┱▆▅┍▅┗▚┻▅━⎺▝⎺▆▄▃▃▂⎺▅▂▅▃▂▃▅╲▅▄▂▖╲▃╸━▅▄▆▃▌▖⎺▄●▅▅▃▂ ▃▃▃┷▆●▃╱▅▆▆▄▆▅▃▃▆▃⎽▝━▂▄▅⎽⎺▋▆▝⎺▖╇▼▝▃▎▝▃▖╺▂╺▍▝▝▅╺▖▄┇⎽▂▃▚▝▅▂▅▂▆▆▃▆▃▂▄▃▖⎽▗▂▅▂╏⎺▝▘▗▘╸▝▅┗▄▅▃▆▄▂╺▝▄▝⎼▂▅▋⎽▄▂▆▅▃▄▂▆▆▄▂▄▖▃▆▅▃▂⎺▆▄▄⎽▮▅╺⎽┑▝▗⎻┣⎺▃▆ ▂▄⎺▃▃╼┑┒▎▊▍▅▅▅▃▅▅▃▂▅▂▄━▄▅▖▌▗▃▆▄⎺▅┙▗▝▆▃▆▄▃▂▖▂▅▝▃▆⎽▃┤▅▄▗▂▃▅▆▄⎺▄⎽⎺▅▂▅▃⎽┛⎺▆▝╸⎽▌⎺▃▅╺▂⎽▃╺▆▅▂▚▅▂▃▄▃▄▄▝▃⎽▎▆▎▃▄⎺▆▃▃▄⎽⎺▆▃⎽▅▖╺▄▖▃▂▃▄▅▃━▆▅▂▂▂┻▄▄▂ ▆▃▆▂━▝▖▖▅╾▄▂▃▆▆▄▃▅▂▆▃■▃⎽▄┓╴┓▅▄▝▄▄▃▂▚▅▆▃▄╼▝◀●⎺▄▚▅▘▝▅▮◀⎽▅■▂⎽▝⎺▅▃▆▃⎽▆▄▂▄▂▘▖▝▌▃▝▌▘╶▊╺╼┳━▄━▮⎼▅▂▂▃━▄▃▂▌▝▂▃▗▂▘⎼▅⎺▅▃▄▃▂⎺▅▂▆▄▂▂◀⎼⎽▗▝▄▗⎺▆▅▂▄▖╾▅ ▄▄╾▼▍▄┲▅■▄▖▖▲▅▋▝▆▅▃⎺▃·▆▃▅▂▂■╸━▖⎺▃▂▘▄╾▃▝▄■▆▖▄▖▖▝▄▋▝▃▄▗▄▄┎▆╺▝▃▄▮▆▄▂▅▂▅▅▃▆▃▂▚▃⎺▃▝▂▄▄⎺┏▄▖⎼⎺━⎼▅▃▖▆▄▂▃▆▖▄▅▂▋▍┗⎺▄▃▂▆▄▂▃▂▅⎺▄▂▃▖▖▃╺▘▗▄▄▂▘▅▃▂▼▃ ▄▅▄┷╾▃▝▃▆▅▅▄▝▗▄▃▌⎺▃▆▄▃▆▂▄▅▂▄▂▖⎽▂▅▃▃▅▄▝━▼▆▚▃▖▖╲▂▗━▅▘▖▃┺▅▍▖╸▆▄⎺▖▆╸▝▄▃▆▃▂▆▄▂▅▂▗▃▄▄▅─▝▘●⎺▅▖▃━▃▍▖▂▝▂▄▝▂▗▖▂▂▆▆━╸▅⎺▼▆╾▆▄▄▃▃⎺▆▄⎽▃▂▄▃▂╺▆╸╼▆▄▗▘ ╸━▃▘▆╸▼▄▃▘▖▶▆▆▂▝╸▆▄▃▆▃▝▄⎺▅▂●▄▅▂▂▖▂■▂▃▖●╸▖▂▆▄▃▖▃┑▋▂▂▅▃■╸▅▗┗▅▍╾⎼◀▝▍▝■▆▅▂▃▂⎺▆▃■▄▂▂▂▂▃╸▗▃·▘╴╺▅⎽⎼▗▖▋▂▅▄┛━▘■●▄▌▆▅━▂╺╺▝▂⎺▅▃▄▂⎽⎺▆▃⎽▄▖▄▄▄▃▃▃▄▃ ╸▖╾╸▅┺━▖┲╺▝▖▄▆▄▄▅▖╲▄▄▅▆▃▆▆▃▆▃⎽▆━▄▂▖▅▘╾▍▆▅▅▃▋▝▚▅▂▖▄▖▖▅▚▄▅┗▗▍▖╺▆╺▄▘▌╴▄▼▝▆▄▂▃▝▆▅▃▆▃⎽▝▃▃▘⎺▅▃▂▚╾▆▝▃▖╾▄▖◼━▃▅▆▝▄▝━·▼▗▂▄▗┓▆▂▆▄▃▃▂◼⎺▅▂▅▃▆▅▅▅▅▅ ▅⎺▆▝╸▼⎺▄▄┗▅▄▂▄▃╺▗▅▄▅▅▄▃▂▆▅▆▆▄▂▅▂▄▄▅▃▂╺▂▘▝⎽▝▅▍╼▖▗▝▄▄▂▆▄┲▅▚▃▄■▘▘⎺▖╺▅▄▆▅▚▖▅▅▅▄▄▃▅▄▃▂▅▂▅▆┷▊╲╏▝━▚╸▃▆▄▅⎺▆▃⎻╸▃┗▖▗▖▘▅┵▎▗▃╺▄▂▖▄▝▆▄▅▃▂▌▆▄▂▄▃▮▄▅ ▆▂▅▄▗▆▃━▼━▂━▝▆▄⎺▃▂▅▅▄▂⎺▝▅▄⎺▝▄▖▆▄▆▄▂▅▆▄▂▃━⎺◀▎┠▍▗▅▗▂▅▄▚▄▆▄┑▆▂▄━▃▃▃▂▄▃▃━⎽▖⎺▄▝▂▆▅▃▄▂⎺▅▃▆▄▂▆▆▆┎▄▗⎺▄╼┻▍▍━╺■▎╺▗▅▖▗▘╸▗▆▗▂▅━▆▎▃▆▗▅▝▅▃▄▂▖⎺▆▄▂▄▖ ▆▂▆▄⎻▖▅▖╸▖▅▖╺▅▍▂▅▃▅▝▄▂▝▂▃╲▂▃▝▝▄▆▆▃▂▅▃▆▄▆▃⎽▖▂┕▘▂▄▃▆■▖▃▗▖▂■▝■▃▝▂▝▗▘▅▃┒━⎺▃┳▝▌▝▃╸▂▆▄▃▃▂⎺▅▂▅▃⎽▍⎼▂⎻▼▚▅▅▂━▝━⎺▖▄⎽▖▂▋━┗⎺▖▖▃▄━■▅▆▅▗▆▝⎺▆▄▃▄▂▅⎺▆▅ ╲⎽▄▚▖▂⎽▅▃▗▃▄━▅▘▅▃▲▘▄▅▝▅▂▝▅▃▃⎻⎽━▅▝▃▄▅▃⎺▄▂▆▃▄▂▍▅▍▅▅▘╸▅╲▃▅▃▂▅▂▅▃┗▝◆▅▄▚▖▄⎺▂▖⎽▄▖▚▃▃▊▅▆▅▃▃▃⎺▆▄⎽▄▂⎽▝▃▃▚▃⎺╱·┕▅━▘▆▝▘▚▂▆▃▄▍▂▂▗▘▄▗▘▄■▅▌▘▋▝▅▄▅▃▘▘ ▃▂▂▝▆▄⎽▆⎽▅▖⎽╺▆▘▘▂▅▅▅▖▃▃▃▂▄▼▆▖■▗▘╸▝▝▝▅▌▄▂▅▃▖▅▆▄▂▝┷▝▃▃⎺▍▖▗▝▚▖⎺▆▆▶▆▖▃■▌◼▆▃■▋▃▂▅▝■▗▃■▖▄⎺▄▂▄▂⎺▅▃▆▃▂▆▅▃▚▘╲▄▃▗▃▂▖▘▗⎽━▄▘▆╺▄▂▆▝┗▝⎽◀╺▅━◼▗▃▂▗▘▅▅ ▅▂▄▂▂╾▃▂▂▅▄▅▘▌▏▆▄▂⎺▃▅▃╱▌▗▆▖▆▄▂▃▄┑▗▂▄▆▃▆▄▅▄⎺▄▂▆▃▅▃⎽▝·╾┣▝▍▌▘━▆▃▂▂╸▼■▅▝╲▖▖■▃▃⎺▃▗▃▗▅▆▝▘▂▅▃▅▄▃▃▂▆▄▂▅▃▂●▆▄▖▃▘▆▄▝▅▗▆╸■▃▘▗▗▂⎼╸▃▖╸▄▄▖▗▄▅▗▗▘▄■⎼
Checking the Look in Text Browsers
It even looks not that bad in elinks — as far as I know the only text browser which supports CSS and styles:

In Lynx and Links 2, the text composing the image is displayed only in black and white, but you at least can recognise the edges in the picture:

Same Functionality in One Tool?
I knew there was a tool which did this in one step. Seems to have been png2html.
Tried to play around with it, too, but neither really understood how to use it (seems to require a text file for the characters to be used — why?) nor did I really got it working. It always ran until I aborted it and it never filled the target file with any content.
Additionally, png2html insists on one character per pixel, requiring to first properly resize the image before converting to HTML.
The Keyboard in the Pictures
Oh, and btw., the displayed keyboard is my Zlant. The Zlant is a 40% uniform staggered mechanical keyboard. Currently, only Zlant PCBs are available at 1UP Keyboards (USA), i.e. no complete kits.
It is shown with the SA
Vilebloom key cap set, currently available at MechSupply (UK).
Tagged as: 1UPKeyboards, 40% Keyboard, aha, chafa, CSS, elinks, Graphics, HTML, Keyboard, Links2, Lynx, Mechanical Keyboard, MechSupply, png2html, SA Vilebloom, Text Browser, Text Mode, xterm, Zlant
// show without comments // write a comment
Related stories
Sunday·10·March·2013
Rendering Markdown, Asciidoc and Friends automatically while Editing //at 15:41 //by abe
Partially because of Markdown being Github’s markup format of choice, I enjoy writing documents in simple markup formats more and more.
There’s though one common annoyance with these formats compared to writing plain HTML…
The Annoyance
They need to be rendered (i.e. more or less compiled) before you can view your outpourings rendered, e.g. in the web browser. So the workflow usually is:
- Saving the current file in your favourite editor
- Switch to terminal with commandline
- Cursor up, Enter
- Switch to your favourite web browser
- Hit the reload button
Using a Specialized Editor with Live Preview
One choice would be to use a specific editor with live rendering. The one I know in Debian (from Wheezy on) is ReText (Debian package retext). It supports Markdown and reStructuredText.
But as with most simple GUI editors, I miss there many of the advanced editing commands possible with Emacs.
Using Emacs’ Markdown Mode
Then there is the Markdown Mode
for Emacs (part of Debian’s emacs-goodies-el package), where
you can get a “preview” by pressing C-c C-c p
. But for
some reason this takes several seconds, opens a new buffer
and window with the rendered HTML code and then starts
(hardcoded) Firefox (which is not my preferred web browser). And if you do that a
second time without closing Firefox first, it won’t just reload the
file but will open a new tab. You might think that just hitting reload
should suffice. But no, the new tab has a different file name, so
reload doesn’t help. Additionally it may not use my preferred Markdown
implementation. Meh.
Well, I probably could fix all those issues with Markdown Mode, it’s only Emacs Lisp. Heck, the called command is even configurable. But fixing at least four issues to fix one workflow annoyance? Maybe some other time, but not as long there are other nice choices…
Using inotifywait to Render on Write
So everytime you save the currently edited file, you immediately want to rerender the same HTML file from it. This can be easily automated by using Linux’ inotify kernel subsystem which notices changes to the filesystem, and reports those to applications which ask for it.
One such tool is inotifywait
which can either output all
or just specific events, or just exit if the first requested event
occurs. With the latter it’s easy to write a while loop on the
commandline which regenerates a file after every write access. I use
either Pandoc or Asciidoc for that since both generate full HTML pages
including header and footer, but you can use that also with Markdown
to render just the HTML body. Most browsers render it correctly
anyway:
while inotifywait -q -e modify index.md; do pandoc -s -f markdown -t html -o index.html index.md; done while inotifywait -q -e modify index.txt; do asciidoc index.txt; done while inotifywait -q -e modify index.md; do markdown index.md > index.html; done
This solution is even editor- and build-system-agnostic (But not operating-system-agnostic.)
inotifywait is part of inotify-tools, a useful set of commandline tools to interface with inotify. They’re packaged in Debian as inotify-tools, too.
Using mdpress for Markdown plus Impress.js based Slides
The ruby-written mdpress is a special case of the previous case. It’s
a commandline tool to convert Markdown into Impress.js based slide
shows and it has an option named --automatic
which causes
it to keep running and automatically update the presentation as soon
as changes are made to the Markdown file.
mdpress is not yet in Debian, but there’s an ITP for it and
Impress.js itself recently entered Debian as libjs-impress.
Nevertheless, two dependencies (highlight.js,
ITP‘ed, ruby-launchy, ITP‘ed) are still missing in Debian.
Tagged as: Asciidoc, Emacs, emacs-goodies-el, GitHub, HTML, Impress.js, inotify, inotify-tools, inotifywait, ITP, Major-Mode, Markdown, mdpress, oneliner, Pandoc, reST, ReText, Ruby, slides, Wheezy
// show without comments // write a comment
Related stories
Tuesday·30·November·2010
Useful but Unknown Unix Tools: colored cal(endar) //at 02:09 //by abe
Another thing I regard as useful on the commandline are colors. (Others commonly refer to my color preferences as eye cancer, but that’s not relevant here. ;-) Colors help to easily distinguish between relevant and non-relevant things or to separate different things.
One colored command line program I use nearly everyday is the colored fork of bsdmainutils’s well know (or at least better known) “cal” program whose output looks like this:
$ cal
November 2010
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
$
Since the colored fork calls itself still “cal” (as the Debian source package is called), to avoid conflicts with bsdmainutils’s cal, the binary package and the binary itself are called ccal (short for colored cal) and its output looks like this:
$ ccal November 2010 Mo Tu We Th Fr Sa Su 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29<30> $
ccal also use the locale definitions (LC_TIME), if available, that’s why the one “screenshot” is Sun-Sat and the other one is Mon-Sun.
According to the man page, ccal has some more improvements over the classic cal:
If displaying the single-month format, ccal will look for a date file (the default file or whatever you specify with the -d option). If found, ccal will read the file, looking for special date descriptions for that month which will be displayed to the right of the calendar. By default, up to 24 appointments (number may be changed with -m) may be displayed per month. If the current date happens to fall on one of these special dates, it will be flagged by an asterisk. If there is room, appointments for the next month may also be displayed (next monthâs dates having definitions like “2nd Thursday” will be skipped).
But I must admit, I don’t use that feature. I just use it as on-demand calendar sheet.
The colored “screenshot” above is btw. generated with Adam Borowski’s ansi2html which popped up after I published my Intent to package “aha” (for Ansi HTML Adapter), the first ANSI colors to HTML converter I found on the net. (And yes I searched for it because of this and some yet to come blog postings. No spoilers here though. ;-)
While capturing colored output of “ls” and some other tools was easy, it needed a little hack to capture ccal’s output, because if you pipe ccal output to anything, it drops its colors. Always. The solution was to run it in GNU Screen, log the output and then pipe the log file through “aha” or “ansi2html”:
$ screen -c /dev/null -L ccal; cat screenlog.0 | ansi2html > ccal.html
Probably the output of every program which drops colors when writing to a pipe instead of a terminal can be fetched that way.
Update, 2:04 CET: As Adam Borowski points out in message 62 of #605380, “script” is the better tool for making tools believe they talk to a terminal:
$ script -q /dev/null -c "ccal" | ansi2html
Catching the output of a whole year’s calender (“ccal 2011”) failed
with GNU screen though, as it was truncated on the 24th of September
by GNU screen (as it was already truncated in the screenlog.0), so no
“screenshot” of that for the moment. And with script, I’d get the
whole output, but would have to manually fix the styles so they don’t
get posted literally to Planet Debian. So look for yourself how the
output of “ccal 2011” looks like by installing ccal. ;-)
Tagged as: aha, ANSI, ansi2html, cal, calendar, ccal, Colorful Console, Eye Cancer, GNU Screen, HTML, ITP, LC_TIME, locales, nuggets, Planet Debian, screen, UUUT
// show without comments // write a comment
Related stories
Wednesday·25·April·2007
Das Web 2.0 Stöckchen //at 01:57 //by abe
Kaum bloggt man mal wieder, kommt einem auch gleich wieder ein Stöckchen entgegen geflogen, dazu auch noch zu einem solch brisanten Thema wie Web 2.0.
Also fangen wir an: Ich nutze Apache 2.0, Blosxom 2.0, Emberl 2.0, WML 2.0, CSS 2.0, Firefox 2.0, HTML 2.0, Debian 2.0, äh, moment, nee, so altbacken bin ich nun auch wieder nicht. Ach, das war gar nicht die Frage? Achso. Na dann wollen wir mal die eigentlichen Fragen beantworten…
- Nutzt Du Social Bookmarking/Networking Seiten wie Digg, Yigg, Mister Wong oder Del.Icio.Us? Wenn ja, welche?
- Kaum. Einen Yigg-Account habe ich, wenn auch schon lange nicht mehr benutzt, Digg ist mir aufgrund ihres Abmahnwahns unsympathisch, Mister Wong sagt mir sowas von gar nix und Del.Icio.Us finde ich durchaus interessant, denke aber nicht, daß es mir wirklich etwas bringt, da ich meine Bookmarks — sofern Zeit ist *hüstel* — selbst von Hand zu Fuß als HTML tippe und damit genauso browserunabhängig bin. Flock nutze ich dementsprechend auch nicht.
- Nebenbei: Digg und Yigg sind für mich keine Bookmarking-Seiten sondern Newsportale. Und unter einer Social Networking-Seite verstehe ich Orkut (Ja, habe ich einen Account, aber vernachlässigt), OpenBC (das neuerdings heißt wie ein Filmchenabspieler für Windows, nein habe ich keinen Account und will auch keinen. Ich mache kein “Business”.) oder LinkedIn (wirkt auf mich noch viel mehr auf Business abgestimmt als OpenBC). Und gute Jobs habe ich bisher auch immer ohne solche Seiten bekommen. Das einzig nette daran, ist festzustellen, wie klein die Welt doch ist.
- Schaust Du Dir Videos bei Videoportalen wie YouTube, Sevenload oder DailyMotion an? Wenn ja, was für Videos guckst Du Dir meistens an?
- Manchmal. Meist dann, wenn sie sowieso grade im Büro umgehen und alle Kollegen gemeinsam vor einem Monitor rumlachen. Sprich, meist sind’s irgendwelche witzigen Sachen. Manchmal auch Filmtrailer. Wobei ich eigentlich außer Google Videos und YouTube kein anderes solches Portal wirklich kenne. Zumindest sagen mir die anderen genannten sowas von gar nix.
- Kennst bzw. nutzt Du Flickr?
- Kennen kommt man wohl kaum drumherum. Nutzen? Ja, manchmal, zum Bilder anschauen, die mir irgendjemand zeigen will oder über die ich sonstwo gestolpert bin. Account habe ich jedenfalls keinen. Ich war mit allen Webgalerie-Lösungen bisher unzufrieden und hab mir meine eigene geschnitzt. Web 2.0 brauche ich an der Stelle bisher nicht. Aber wer weiß, vielleicht bekommt das Ding auch mal RSS-Feed-Support.
- Was hälst Du von Diensten wie Twitter oder Frazr?
- Ich kenne sie nicht einmal. *draufklick* Nix.
- Wie viele RSS-Feeds hast Du abonniert?
- Ich meine mich zu erinnern, dass neuere Versionen von Lilina nur bis ca. 50 Feeds skalieren. Ich hab ein paar mehr, vermutlich so ca. 60-70 Blogs und ähnliches. Dazu noch unzählige Newsfeeds (wohl so um die 40-50, Tendenz steigend, vor allem Symlink wegen), die ich aber von den Blogfeeds getrennt halte und auch nicht mit einem Feedreader sondern so einer Art Cheesy Portal lese. Wobei es so aussieht, als ob sich bei Lilina wieder was tut, jedenfalls hat die Seite ein neues Design und eine neue URL. Müßte ich mir mal wieder mal ansehen.
- Liest Du die alle täglich?
- Nicht mal mehr monatlich oder sonstwie regelmäßig. Seit das letzte Upgrade meines Lilinas eine katastrophale Performance an den Tag legte eigentlich gar nicht mehr. Und zum Flicken hatte ich bisher keine Lust. Genausowenig wie ich bisher Muße dazu hatte, mein “Cheesy Portal” wieder in Sachen Feeds auf den aktuellen Stand zu bringen. Deswegen auch keine Links. Liegt wohl daran, daß mir die Arbeit seit dem Stellenwechsel vor einem Jahr wieder richtig Spaß macht und deswegen keine Zeit mehr für solche weniger wichtigen Dinge ist. ;-)
- In wie vielen Weblogs bloggst Du? (Eigene oder Mitautor)
- Da ich Symlink nach wie vor nicht als Blog ansehe (und auch nicht unbedingt den ISG Newsticker oder den LUG-Camp 2007 Newsticker) nur in zweien: In diesem meinem eigenen Blog wenn mir gerade danach ist (also nicht mit dem Zwang täglich was zu posten, wie manch andere Leute) als auch in der inoffiziellen Blosxom User Group, dort im Normalfall dann, wenn’s was neues (aber nicht notwendigerweise wichtiges) in der Blosxom Community gibt.
- Kommentierst Du in anderen Blogs? Wenn ja was?
- Hin und wieder mal. Meist bei Freunden, manchmal auch bei Leuten, die ich nicht kenne. Was es dann ist, ist recht unterschiedlichen. Von hilfreichen Informationen bis hin zu blöden Kommentaren ist sicher schon alles dabei gewesen. ;-)
- Wer ist Dein persönlicher Blog-König von
Deutschlandder Schweiz? - Was ist ein “persönlicher Blog-König”? Jemand, der Blogs schreibt so wie das Klischee sie erwartet, eben täglich, mit viel persönlichem oder unwichtigem Zeugs? Hmm, in der Schweiz die RUBIs sind recht fleissig und viel persönliches ist da auch dabei, dazu ist’s noch witzig, weil praktisch die ganze Familie bloggt. Und informativ ist es ab und an außerdem noch. In Deutschland kenne ich zu wenige Blogs, aber da fand ich immer das Daily Ivy Blog ganz gut, auch wenn es als Blog keinerlei wirklichen Ersatz für Ivys Bar sein kann. *seufz*
- Gehört Weblogs Deiner Meinung nach die Zukunft oder sind sie nur ein vorübergehender Hype?
- Weder noch. Sie sind eine Nuance eines Mediums mehr, die das letzte Jahrzehnt hervorgebracht hat. Mit eigenem Charakter und nicht eigentlich kaum mehr wegzudenken, aber sicher auch nicht die Krone der Web-2.0-Schöpfung.
- Wird es Dein Blog / Deine Blogs dann auch noch geben?
- Es ist glaube ich gemeinhin bekannt, daß ich selten was wegschmeiße oder gar Webseiten lösche, nur weil ich sie grade nicht brauche, nutze oder pflege.
Und bevor’s zu Ende ist, füge ich hier grade noch zwei Fragen ein, weil ich doch das eine oder andere zum Thema Web 2.0 in diesem Stöckchen vermisse.
- Welchen Feedreader nutzt Du?
- Webbasiert: den bereits erwähnten Lilina für Blogs und einen auf einer PHP-Feedreader-Bibliothek basierender Eigenbau, der nach dem Vorbild von Slashdots Cheesy Portal gebaut ist — nur mehrspaltig, für News. Sonst Opera, allerdings nur mit wenigen Feeds. Ich habe zwar auch schon raggle und snownews ausprobiert und so schlecht sind die beiden sicher auch nicht (snownews ist einen Tick intuitiver zu bedienen), aber wirklich begonnen sie zu nutzen habe ich nicht. Gregarius fürs Web und Newsbeuter für die Textkonsole wollte ich mal noch ausprobieren.
- Was gehört für Dich sonst noch zum Web 2.0?
- Google Maps, maps.search.ch und Konsorten inklusive API. Könnte man auch unter dem Überbegriff AJAX laufen lassen. Dann natürlich Wikis. Und nicht zu vergessen Microformats wie z.B. XFN. Wundert mich eigentlich, das das vorher kaum vorkam in dem Stöckchen.
- Wo gehts weiter mit dem Web 2.0 Stöckchen?
- Also sicher mal bei Venty sei’s in seinem leider schon wieder aufgegebenen Gopher-Blog oder in seinem PodCast, dem ich nicht wirklich folge, weil ich keine PodCasts höre.
- Dann vielleicht noch bei Dieter Schlabonski, weil der es sicher schafft, auch daraus einen stilechten Rant zu machen.
- Und Myon bastelt ja bei Debian gerne mit Web-2.0-Methoden rum, dem werfen wir das grade auch mal zu.
- Sonst fallen mir nur noch Leute ein, die kein Blog haben und daher auch kaum Stöckchen fangen können oder das Stöckchen schon bekommen haben. :-)
Now playing: El-Vez — Mexican Radio
Tagged as: 0x1b, AJAX, Apache, Blogging, Blosxom, Comic, Debian, del.icio.us, Embperl, Flickr, Google, Google Maps, Gopher, HTML, Ivy, Lilina, maol, map.search.ch, Meme, Microformats, Myon, newsbeuter, OpenBC, Opera, Orkut, Other Blogs, Quiz, raggle, Schlabonski, Slashdot, snownews, Social Networking, Stöckchen, Symlink, Ventilator, Web, Web 2.0, WML, XFN, Yigg, YouTube
// show without comments // write a comment
Related stories
Friday·10·March·2006
Tagging with Technorati style in pure Blosxom //at 03:22 //by abe
Short summary: I can’t stay away from coding Blosxom plugins. Perl rules. PHP sucks. ;-)
- New version 0.04 of the tagging plugin, supporting Technorati style tag links to many resources.
- New add-on plugin pathbasedtagging to the plugin tagging, implementing Technorati style tag links in pure Blosxom without any help from Apache’s mod_rewrite.
- New plugin dept offering Slashdot like “dept.” lines for Blosxom postings.
Supporting Technorati style tag URLs
After releasing the last version of my Blosxom plugin tagging, I
noticed that Technorati only seems to like URLs ending in
“/tagname
” but not ending in “=tagname
” (as
they do if you use classic query strings instead of the path info),
even if the a
tag has a rel="tag"
attribute. And not only I noticed this but also some other users of
the plugin. (Although I do wonder how Furl made it to a Technorati
partner with URLs like http://www.furl.net/furled.jsp?topic=tags…)
So I somehow had to change the syntax style for my tags. This wasn’t very hard for the links, but I wanted them to still link to my blog and not to Technorati, Flickr, Wikipedia or any other external resource.
Implementing Technorati style tag URLs
The obviously easiest solution for someone who’s using and administrating Apache web servers for nearly ten years now was to use some mod_voodoo—eh—mod_rewrite:
RewriteEngine On RewriteRule ^/cgi-bin/blosxom.cgi/tags/(.*)$ /cgi-bin/blosxom.cgi?-tags=$1 [PT]
That way I could use Technorati style tags and had a well performing solution. But somehow this solution wasn’t that satisfying since it wasn’t pure Blosxom and therefore had some dependency including access to some Apache config file. (Even if the config file was called .htaccess. ;-)
A pure Blosxom solution
A few days ago I somehow noticed that in general a special behaviour
on some URLs could also be implemented using Blosxom’s API. Using the
entries
function to modify the Blosxom internal path
itself before Blosxom or e.g. the entries_index runs but not returning
any hashes, allows to have some path like URLs not being treated as a
path by Blosxom.
Unfortunately this couldn’t be incorporated into the tagging plugin
itself, since plugins doing such path interpreting voodoo needs to be
ran before any plugin supplying an entries
function
runs. But the tagging plugin must run after such a plugin. So I
created the small add-on plugin
pathbasedtagging which is solely thought for use together with the
tagging plugin (but may have other, yet unknown purposes).
And since I got asked if they could use the tagging plugin to link to external tag URLs instead of the own blog, I included a ready to use list of more or less popular external tag URLs including Technorati, Flickr, del.icio.us, de.lirio.us and Wikipedia.
from the slashdot dept.
Since I’ve always liked the often sarcastic or even evil comments inside Slashdot’s subtitle alike dept. lines and since I’m also used to use them at Symlink, I wanted them in my blog, too. Time for a new plugin.
The basic work of parsing out the data from the text files the posts reside in was already written for the tagging plugin. So I just had to use that code, simplify it and add some little more code to get the dept plugin whose results you can see in my blog directly beneath the title of a posting since a few days now.
Update 02:52h
Hey, see my Technorati
profile: It worked! Technorati recognised the tags! Yeah!
Tagged as: Apache, Blogging, Blosxom, Blosxom Plugin, Dept, GPL, Hacks, HTML, mod_voodoo, Open Source, pathbasedtagging, Perl, Slashdot, Symlink, Tagging, Technorati, Wikipedia
// show without comments // write a comment
Related stories
Thursday·02·March·2006
Back from Berlinux 2005 //at 02:27 //by abe
I was at Berlinux 2005 this weekend and though the very chaotic — because understaffed — organisation it was interesting and also funny.
Thursday I arrived around 20:15 in Berlin, met Klaus Knopper and others at the train station, headed to Sven Guckes’ appartment for dropping all my luggage, then going back to meet with Klaus and the others for a theremin concert with Dorit Chrysler. No wonder that it sounded sometimes like one of my favourite musicians, Jean Michel Jarre, since — according to the Wikipedia theremin article — he also plays this instrument.
On Friday I held my talk about WML in front of a — for that topic — surprisingly high number of auditors (around 30, maybe 35). In comparision to my WML talk at OscomTag 2005 all people who asked questions had understood about what the talk was, so the questions were most time interesting and justified. As usual I held the talk using Lynx with LSS support (picture by Sven Guckes) on my nine year old Pentium 1 ThinkPad bijou running Debian GNU/Linux 3.0 aka Woody.
Before and after the talk I helped out at Werner Heuser’s xtops booth (another picture by Sven) and the booth of the Debian Project (yet another picture by Sven :-) directly beside Frank Ronneburg’s Debian powered model railway. (picture by you-know-who ;-) In the evening I was at the social event, hanging around with alphascorpii, Tolimar and Joey and being surprised that Joey studies biology — as I did as minor to computer science.
On Saturday I was on alphascorpii’s talk about why being a BOFH is not funny, hung around at the same booths as the day before, fixed the X configuration on my laptop after hints on a unknown Debian booth visitor. Before the exhibition closed I heard a very interesting talk about web accessibility held by Sebastian who is blind himself. Although or maybe because I’m interested in that subject, the talk opened my eyes regarding two things: First »Captchas are evil« and »Blind HTML tables aren’t as evil as all the priests of web accessibility are always preaching«. They are easier than frames for blinds and seem to have only little disadvantages against a CSS based layout for blinds nowadays if used the right way. Oh, and btw. — nested tables are still evil. :-)
Saturday evening I had dinner together with Stefan Gerdelbracht, Frank Hofmann, Klaus Knopper and Manfred Krejcik. Later Thomas Winde joined us. It was very interesting evening, especially talking with Klaus and Manfred.
On Sunday, after having brunch with Stefan and Manfred, we met with Sven (who was our host at Berlin, thanks again!) and shortly after that, Stefan left for visiting some other friends in Berlin. Sven, Manfred and I visited C-Base where Sven stumbled over a sound editing seminar while Manfred was preparing his zipFM show for Monday which mainly consisted of an interview with Klaus. After that we headed to a small but fine birthday party of a friend of Sven and were back home around 2:30.
My train left Monday morning at 8:56 and I was at home around 14:30. And on Friday I’ll go to Dresden for the Linux-Info-Tag by train just to go back to Berlin afterwards, where I meet my parents for a two week baltic sea holiday in Mecklenburg-Western Pomerania near Rügen. But due to the Systems fair at Munich and autumn holidays I have to stay at work this week.
And yes, I wrote this and the other postings posted today offline, so
they’re dated quite close together. :-)
Tagged as: Berlin, Berlinux, bijou, Captchas, CSS, Debian, Dresden, Events, Holidays, HTML, Jean Michel Jarre, Knoppix, Linux, Linux-Info-Tag, Music, Talk, Text Mode, Theremin
// show without comments // write a comment
Related stories
about:blank ist unsicher sagt der MSIE //at 01:37 //by abe
Ich habe auf meinem Windows-2003-Testrechner im Büro about:blank als Startseite des MSIE eingestellt. Trotzdem kommt seit einem der letzten Windows-Updates beim Starten des MSIE immer irgendeine Microschrott-Seite. Einmal nach einem Update kann ich das als Marketing oder sonstwas noch verstehen, aber jetzt dauerhaft?
Zum Testen, ob wenigstens der Button “Startseite” noch tut, habe ich drauf geklickt. Und bekam das da:

Die Konfiguration auf diesem Rechner ist eine etwas gelockerte Windows 2003 Standard-Konfiguration.
Inhalt von about:blank ist übrigens:
<HTML></HTML>
Danke, Microsoft, daß Du mich vor einer solch gefährlichen
Seite bewahrt hast!
Tagged as: HTML, JavaShit, Microsoft, MSIE, Sarcasm, Screenshot
// show without comments // write a comment