Discussion:
[tclug-list] emoji test for terminal
Mike Miller
2018-08-09 20:49:54 UTC
Permalink
Thought you all might enjoy this. It looks great in the latest
gnome-terminal:

wget -qO- https://www.fileformat.info/info/emoji/browsertest.htm | grep -B4 '</tr>' | grep -P "<td><a href=|>.{1,5}/td" | grep -A1 href | grep -v -- '^--' | perl -pe 's/<td><a/<a/' | cut -d'>' -f2 | perl -pe 's#<?/(td|a)$##' | paste -d'=' - - | perl -pe 's/=/ = /; s/\n/\n\n/' > emoji_test.txt

same code, more readable:

wget -qO- https://www.fileformat.info/info/emoji/browsertest.htm | \
grep -B4 '</tr>' | grep -P "<td><a href=|>.{1,5}/td" | \
grep -A1 href | grep -v -- '^--' | perl -pe 's/<td><a/<a/' | \
cut -d'>' -f2 | perl -pe 's#<?/(td|a)$##' | paste -d'=' - - | \
perl -pe 's/=/ = /; s/\n/\n\n/' > emoji_test.txt

Then you can look at it using various programs and terminals. In
gnome-terminal, use Ctrl+ (Ctrl with plus sign, which really means
Ctrl-Shift with the =/+ key) to get a bigger font. I hit it about 8 times
to go to max size after doing this:

less emoji_test.txt

This is a little more fun to look at:

grep '=' emoji_test.txt | perl -pe 's/^.* = //' | paste - - - - - | perl -pe 's/\n/\n\n/' | less

That drops the descriptive text and shows five emojis per line.

If you aren't seeing beautifully-colored little icons like these...

Loading Image...

...then you might need a new terminal.

You might also like to try Marcus Kuhn's UTF-8 terminal test files, like
this one:

wget -qO- https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt | less

Best,
Mike

Loading...