X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/d7c1207fb1cf7dcac45dd455a78d4c8c106ca4a3..06ddf29e06aa7f68bf1a72ee8c4261f45bb491ed:/unicode.plp diff --git a/unicode.plp b/unicode.plp index 73d07a5..d5e0145 100644 --- a/unicode.plp +++ b/unicode.plp @@ -2,6 +2,7 @@ use utf8; use strict; use warnings; +no warnings 'qw'; # that's not a comment, it's a NUMBER SIGN use open IO => ':utf8'; our $VERSION = '1.0'; @@ -16,68 +17,16 @@ $header{content_type} = 'text/html; charset=utf-8'; digraph cheat sheet - -

Common Digraphs

+

Common uncommon Unicode

i^k in Vim. Also see the complete digraphs table.

+
+ <: my $diinfo = do 'digraphs.inc.pl'; my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} } @@ -108,16 +57,29 @@ sub table { $colspan++; next; } - elsif ($cell =~ s/^-//) { - $class = 'empty'; + + my $code = join '', map { $di{ord $_} || '' } split //, $cell; + my $name = $diinfo->{$code}->[1]; + + if ($cell =~ s/^-//) { +# $class = 'Empty'; } elsif ($cell eq '=') { - $class = 'reserved'; + $class = 'Reserved'; $cell = ''; } - - my $code = join '', map { $di{ord $_} || '' } split //, $cell; - my $name = $diinfo->{$code}->[1]; + elsif ($cell =~ /[ -~]/) { + $class = 'Ascii'; + } + elsif (not $code) { + $class = 'DiNone'; + } + elsif ($diinfo->{$code}->[2] =~ /\bXz\b/) { + $class = 'DiProp'; + } + else { + $class = 'Di'; + } $rows[-1] .= sprintf('%s%s', defined $name ? qq{ title="$name"} : '', @@ -135,30 +97,33 @@ sub table { if ($colheads) { unshift @rows, sprintf '%s', join '', - map { sprintf '%s', split(/:/, $_, 2) } + map { sprintf '%s', split(/:/, $_, 2), '', '' } @$colheads } - return sprintf "\n%s
\n", join '', map {"$_\n"} @rows; + return sprintf qq{\n%s
\n}, + join '', map {"$_\n"} @rows; } -print "

Common

\n\n"; +print "
\n", "

Popular

\n\n"; print table(@$_) for ( [ 3 => [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚}]], [ 3 => [qw{. † ‡ • . § ¶ # . © ® ™ . − × ÷ . ± ² √}]], [ 3 => [qw{. å ä ö ü ß . Å æ ø ű ſ}]], [ 3 => [qw{. ¿ ç ñ é ê è}]], ); +print "
\n\n"; -print "

Arrows

\n\n"; +print "
\n", "

Arrows

\n\n"; print table(@$_) for ( [ 4 => [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}]], [ 4 => [qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}]], [ 3 => [qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢}]], [ 3 => [qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿}]], ); +print "
\n\n"; -print "

Line drawing

\n\n"; +print "
\n", "

Line drawing

\n\n"; print table(@$_) for ( [ 4 => [qw{. ┌ ┬ ┐ . ├ ┼ ┤ . └ ┴ ┘}]], [ 4 => [qw{. ┏ ┳ ┓ . ┣ ╋ ┫ . ┗ ┻ ┛}]], @@ -175,18 +140,28 @@ print table(@$_) for ( [ 3 => [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }]], [ 3 => [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }]], ); +print "
\n\n"; -print "

Signs

\n\n"; +print "
\n", "

Blocks

\n\n"; print table(@$_) for ( - [ 3 => [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ . ░ ▒ ▓}]], + [ 3 => [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }]], + [ 3 => [qw{. ░ . ▒ . ▓ }]], + [ 2 => [qw{. ▛ ▚ ▟ . ▙ ▞ ▜ }]], + [ 2 => [qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ ▔ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▕ }]], [ 3 => [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}]], - [ 4 => [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}]], - [ 5 => [qw{. ☼ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}]], # solar -# [12 => [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}]], # zodiac +); +print "
\n\n"; + +print "
\n", "

Signs

\n\n"; +print table(@$_) for ( [ 8 => [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}]], + [ 4 => [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}]], + [ 5 => [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}]], # solar + [12 => [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}]], # zodiac ); +print "
\n\n"; -print "

IPA

\n\n"; +print "
\n", "

IPA

\n\n"; print table(@$_) for ( [ 12 => [qw{ @@ -237,8 +212,21 @@ print table(@$_) for ( [map {substr($_, 0, 1).':'.$_, substr($_, 0, 1)." r:$_ rounded"} qw{Front Central Back}] ], ); +print "
\n\n"; -print "

Japanese

\n\n"; +print "
\n", "

Alphabetics

\n\n"; +print table(1, + [ map { ('.', split //, $_->[1]) } @$_ ], + [ map { $_->[0] } @$_ ], +) for [ + [Latin => 'aīıęôɳŋṡšđðƷ'], + [Cyrillic => 'аійэёнњшщчьЯ'], + [Greek => 'αίϊηϋπψσςθξΩ'], + [Hebrew => 'אײיעונןסשטצץ'], +]; +print "
\n\n"; + +print "
\n", "

Japanese

\n\n"; print table(@$_) for ( [ 1 => [qw{ @@ -296,3 +284,20 @@ print table(@$_) for ( [qw{A I U E O}], ], ); +print "
\n\n"; + +:>
+ + + +