emoji: page listing msn emoticon i/o and unicode equivalents
[sheet.git] / emoji.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'emoji cheat sheet',
5         version => 'v1.0',
6         description => [
7                 "MSN emoticons",
8         ],
9         keywords => [qw'
10                 sheet cheat emoticon smiley emoji msn
11         '],
12         stylesheet => [qw'light dark red'],
13 });
14
15 :>
16 <h1>MSN emoticons</h1>
17
18 <:
19 my @info = do 'emoji.inc.pl' or die $@;
20 my $MSNURL = '<img src="http://messenger.msn.com/Resource/emoticons/%s.gif">';
21
22 print '<table class="glyphs"><tbody>'."\n";
23 for (my $i = 0; $i <= $#info; $i++) {
24         my $name = $info[$i++];
25         my ($input, $char, $desc) = @{ $info[$i] };
26         if ($char < 0) {
27                 # inexact
28                 $char = -$char;
29         }
30         printf "<tr><th>%s<td><kbd>%s</kbd><td>$MSNURL<td>%s\n",
31                 $name, EscapeHTML($input), $desc, chr($char);
32 }
33 print "</table>\n";
34