X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/61672b1912da0a1b1669259718e04b268367f98e..f58c07717bb2e77d1f5010a23f4986ec85ff4f7a:/unicode.plp diff --git a/unicode.plp b/unicode.plp index 7207b03..33de0fb 100644 --- a/unicode.plp +++ b/unicode.plp @@ -1,34 +1,22 @@ -<: -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 = 'v1.0'; - -$header{content_type} = 'text/html; charset=utf-8'; - -:> - +<(common.inc.plp)><: + +Html({ + title => 'unicode glyph cheat sheet', + version => 'v1.0', + description => [ + "Common Unicode characters with digraph or code point, layed out for quick location.", + "Includes general symbols, arrows, drawing characters, and IPA letters.", + ], + keywords => [qw' + unicode glyph char character reference common ipa symbol sign mark table digraph + '], + stylesheet => [qw'light dark red'], +}); - - -digraph cheat sheet -<: - my %styles = map {$_ => $_} qw(dark circus mono red terse); - our $style = exists $get{style} && $styles{$get{style}} || 'light'; - printf(qq{\n}, - $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_ - ) for keys %styles; :> - +

Common Unicode

- -

Common uncommon Unicode

- -

i^k in Vim. +

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

@@ -38,14 +26,6 @@ my $diinfo = do 'digraphs.inc.pl'; my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} } sort { length $a <=> length $b } keys %$diinfo; -sub quote { - local $_ = shift; - s/"/"/g; - s//>/g; - return $_; -} - sub glyph_table { my ($digraphs) = @_; @@ -93,6 +73,8 @@ sub glyph_table { $cell = ''; } else { + push @class, 'X'; + if ($cell =~ s/^-//) { push @class, 'di-rare'; # discouraged } @@ -106,9 +88,6 @@ sub glyph_table { push @class, 'di-prop' # unofficial if $diinfo->{$code}->[2] =~ /\bXz\b/; } - elsif (defined $name) { - push @class, 'X'; - } if ($cell =~ /[ -~]/) { push @class, 'di-a'; # ascii @@ -123,8 +102,8 @@ sub glyph_table { defined $name ? qq{ title="$name"} : '', @class ? sprintf(' class="%s"', join ' ', @class) : '', $colspan > 1 && qq{ colspan="$colspan"}, - $cell eq '' ? ' ' : quote($cell), - defined $code ? sprintf(' %s', quote($code)) + $cell eq '' ? ' ' : EscapeHTML($cell), + defined $code ? sprintf(' %s', EscapeHTML($code)) : length($cell) == 1 && $cell !~ /[a-z]/ ? sprintf(' %04X', 'value', ord $cell) : '', @@ -153,17 +132,27 @@ print_glyph_tables( 'Popular', [qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}], [qw{. † ‡ • . § ¶ # . © ® ™ . ° ′ ″ . − × ÷ . ± ² √}], - [qw{. ⚋ ⚊ . ⚐ ⚑ . ☺ ☹ . ✓ ✗ . ✔ ✘ . ◄ ► }], + [qw{. ⚋ ⚊ . ⚐ ⚑ . ☺ ☹ . ✓ ✗ . ✔ ✘ }], [qw{. Ã¥ ä ö ü ß . ā æ ø ű Å¿}], [qw{. ¿ ç ñ é ê è}], [qw{. α β}], [qw{. א}], - 'Signs', - [qw{. ¤ ¢ ₥ € £ ₨ $ Â¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}], + 'Symbols', + [qw{. ¤ ¢ ₥ € £ ₨ $ Â¥ . ฿ ₫ ₭ ₦ ₱ ₮ ₩ ₪}], [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}], + [qw{. ☮ ☯ ☻ ♪ ♲ ♿ }], + [qw{. ✂ ✉ ☎ }], [qw{. ⚠ ☡ ☠}], + 'Signs', [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}], # solar [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}], # zodiac + 'Key commands', + [qw{. ⇥ ⇤ . ␣ ⌫ }], # common spacing + [qw{. ⎀ ⇱ ⇞ . ⌦ ⇲ ⇟ }], # edit block + [qw{. ⇪ ⇯ ⇭ . ⇧ ⇮ № }], # modifier + [qw{. ⎈ ⌥ ⌘ ⎄ }], [qw{. ↵ ⎋ ⎉ ⎊ }], # command + [qw{. ► ⏩ ⏭ ◼ ⚫ . ◄ ⏪ ⏮ ⏏ -❚❚ }], # player ui + 'Arrows', [qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}], [qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}], @@ -191,7 +180,9 @@ $verbose ? ( . ╵ │ ╎ ┆ ┊ ╷ ╿ . ╹ ┃ ╏ ┇ ┋ ╻ ╽ }], + [qw{. ╭ ╮ . ╰ ╯ }], [qw{. ╱ ╳ ╲ }], + # ┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃╄╅╆╇╈╉╊ 'Blocks', [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}], @@ -296,14 +287,3 @@ $verbose ? (
- - -