X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/7e61bf43e629fb11d22bebfd4b31226fdea31651..d96b16650836046f79dc76641681445f97bd60ce:/emoji.plp diff --git a/emoji.plp b/emoji.plp index 2bb0b9a..00e7506 100644 --- a/emoji.plp +++ b/emoji.plp @@ -4,31 +4,48 @@ Html({ title => 'emoji cheat sheet', version => 'v1.0', description => [ - "MSN emoticons", + "Emoticons overview and Unicode equivalents" + . " of MSN, Y!M, and Gmail icons.", ], keywords => [qw' - sheet cheat emoticon smiley emoji msn + sheet cheat emoticon smiley emoji unicode + chat im messenger msn yahoo ym gmail google '], - stylesheet => [qw'light dark red'], + stylesheet => [qw'light'], }); :> -

MSN emoticons

+

IM emoticons

<: -my @info = do 'emoji.inc.pl' or die $@; -my $MSNURL = ''; +print '
'."\n"; -print ''."\n"; -for (my $i = 0; $i <= $#info; $i++) { - my $name = $info[$i++]; - my ($input, $char, $desc) = @{ $info[$i] }; - if ($char < 0) { - # inexact - $char = -$char; +for my $system (qw'gmail msn yahoo') { + my @info = do "emoji-$system.inc.pl"; + my $meta = shift @info or die $@; + ref $meta eq 'HASH' or die "invalid $system definitions"; + my $title = $meta->{name} // $system; + $title = qq{$title} for $meta->{source} || (); + + printf '

%s

'."\n\n", $meta->{name} // $system; + print '
'."\n"; + for (my $i = 0; $i <= $#info; $i++) { + my $name = $info[$i]; + unless (ref $info[$i+1] eq 'ARRAY') { + printf '
'."\n", $name; + next; + } + my ($input, $flags, $char, $desc) = @{ $info[++$i] }; + printf('
%s%s%s%s'."\n", + sprintf($meta->{ $flags =~ /\bext\b/ ? 'iconext' : 'icon' } // '%s', $name), + EscapeHTML($name), + EscapeHTML($input), + $desc // $name, + $char ? ''.chr($char) : '', + ); } - printf "
%s%s$MSNURL%s\n", - $name, EscapeHTML($input), $desc, chr($char); + print "
\n\n"; } -print "\n"; + +print "
\n\n";