git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
red styling for index and unicode
[sheet.git]
/
unicode.plp
diff --git
a/unicode.plp
b/unicode.plp
index bcfebd1adb3cac2d75aadbc12b9e4a93fae06229..79ba220aa286bfbc8ea3a093681e1e348f09181e 100644
(file)
--- a/
unicode.plp
+++ b/
unicode.plp
@@
-1,28
+1,14
@@
-<:
-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)><:
+ our $VERSION = 'v1.0';
:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
:><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
-<title>digraph cheat sheet</title>
<meta http-equiv="content-type" content="utf-8">
<meta http-equiv="content-type" content="utf-8">
-<link rel="stylesheet" type="text/css" media="all" href="/base.css"><:
- my %styles = map {$_ => $_} qw(dark circus mono red terse);
- our $style = exists $get{style} && $styles{$get{style}} || 'light';
- printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
- $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
- ) for keys %styles;
-:>
+<title>digraph cheat sheet</title>
+<:= stylesheet(qw'light dark red') :>
</head>
<body id="unicode">
</head>
<body id="unicode">
@@
-36,15
+22,7
@@
Also see the <a href="/digraphs">complete digraphs table</a>.</p>
<:
my $diinfo = do 'digraphs.inc.pl';
my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
<:
my $diinfo = do 'digraphs.inc.pl';
my %di = map { $diinfo->{$_}->[0] => $_ } grep { ref $diinfo->{$_} }
- keys %$diinfo;
-
-sub quote {
- local $_ = shift;
- s/"/"/g;
- s/</</g;
- s/>/>/g;
- return $_;
-}
+ sort { length $a <=> length $b } keys %$diinfo;
sub glyph_table {
my ($digraphs) = @_;
sub glyph_table {
my ($digraphs) = @_;
@@
-123,8
+101,8
@@
sub glyph_table {
defined $name ? qq{ title="$name"} : '',
@class ? sprintf(' class="%s"', join ' ', @class) : '',
$colspan > 1 && qq{ colspan="$colspan"},
defined $name ? qq{ title="$name"} : '',
@class ? sprintf(' class="%s"', join ' ', @class) : '',
$colspan > 1 && qq{ colspan="$colspan"},
- $cell eq '' ? ' ' :
quote
($cell),
- defined $code ? sprintf(' <small class="digraph">%s</small>',
quote
($code))
+ $cell eq '' ? ' ' :
EscapeHTML
($cell),
+ defined $code ? sprintf(' <small class="digraph">%s</small>',
EscapeHTML
($code))
: length($cell) == 1 && $cell !~ /[a-z]/
? sprintf(' <small class="%s">%04X</small>', 'value', ord $cell)
: '',
: length($cell) == 1 && $cell !~ /[a-z]/
? sprintf(' <small class="%s">%04X</small>', 'value', ord $cell)
: '',
@@
-139,7
+117,7
@@
sub glyph_table {
sub print_glyph_tables {
while (@_) {
sub print_glyph_tables {
while (@_) {
- printf
"<div><h2>%s</h2>
\n\n", shift;
+ printf
'<div class="section"><h2>%s</h2>'."
\n\n", shift;
while (ref $_[0] and $_ = shift) {
print glyph_table($_);
}
while (ref $_[0] and $_ = shift) {
print glyph_table($_);
}
@@
-147,20
+125,40
@@
sub print_glyph_tables {
}
}
}
}
+our $verbose = exists $get{v};
+
print_glyph_tables(
'Popular',
[qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}],
[qw{. † ‡ • . § ¶ # . © ® ™ . ° ′ ″ . − × ÷ . ± ² √}],
print_glyph_tables(
'Popular',
[qw{. « » . ‹ › . ‘ ’ . “ ” . „ ‚ . ‟ ‛}],
[qw{. † ‡ • . § ¶ # . © ® ™ . ° ′ ″ . − × ÷ . ± ² √}],
- [qw{. å ä ö ü ß . Å æ ø ű ſ}],
+ [qw{. ⚋ ⚊ . ⚐ ⚑ . ☺ ☹ . ✓ ✗ . ✔ ✘ . ◄ ► }],
+ [qw{. å ä ö ü ß . ā æ ø ű ſ}],
[qw{. ¿ ç ñ é ê è}],
[qw{. ¿ ç ñ é ê è}],
+ [qw{. α β}], [qw{. א}],
+
+ 'Signs',
+ [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}],
+ [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}],
+ [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}], # solar
+ [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}], # zodiac
'Arrows',
[qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}],
[qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}],
'Arrows',
[qw{. ↖ ↑ ↗ ↔ . ← - → ↕ . ↙ ↓ ↘ -}],
[qw{. ⇖ ⇑ ⇗ ⇔ . ⇐ - ⇒ ⇕ . ⇙ ⇓ ⇘ -}],
+ [qw{. ⬁ ⇧ ⬀ ⬄ . ⇦ - ⇨ ⇳ . ⬃ ⇩ ⬂ -}],
+ [qw{. ⬉ ⬆ ⬈ ⬌ . ⬅ - ➡ ⬍ . ⬋ ⬇ ⬊ -}],
+ [qw{. ◩ ⬒ ⬔ . ◧ □ ◨ . ⬕ ⬓ ◪ }],
[qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢ }],
[qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿ }],
[qw{. ◤ ▲ ◥ . ◀ ◆ ▶ . ◣ ▼ ◢ }],
[qw{. ◸ △ ◹ . ◁ ◇ ▷ . ◺ ▽ ◿ }],
+$verbose ? (
+ [qw{. . - . }],
+ [qw{. . - . }],
+) : (),
'Line drawing',
'Line drawing',
+ [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }],
+ [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }],
+ [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }],
[qw{. ┌ ┬ ┐ . ├ ┼ ┤ . └ ┴ ┘}],
[qw{. ┏ ┳ ┓ . ┣ ╋ ┫ . ┗ ┻ ┛}],
[qw{. ┍ ┯ ┑ . ┝ ┿ ┥ . ┕ ┷ ┙}],
[qw{. ┌ ┬ ┐ . ├ ┼ ┤ . └ ┴ ┘}],
[qw{. ┏ ┳ ┓ . ┣ ╋ ┫ . ┗ ┻ ┛}],
[qw{. ┍ ┯ ┑ . ┝ ┿ ┥ . ┕ ┷ ┙}],
@@
-172,22
+170,13
@@
print_glyph_tables(
. ╹ ┃ ╏ ┇ ┋ ╻ ╽
}],
[qw{. ╱ ╳ ╲ }],
. ╹ ┃ ╏ ┇ ┋ ╻ ╽
}],
[qw{. ╱ ╳ ╲ }],
- [qw{. ╔ ╦ ╗ ═ . ╠ ╬ ╣ ║ . ╚ ╩ ╝ - }],
- [qw{. ╒ ╤ ╕ . ╞ ╪ ╡ . ╘ ╧ ╛ }],
- [qw{. ╓ ╥ ╖ . ╟ ╫ ╢ . ╙ ╨ ╜ }],
'Blocks',
'Blocks',
- [qw{. �
� ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗
}],
+ [qw{. �
� ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨
}],
[qw{. ░ . ▒ . ▓ }],
[qw{. ░ . ▒ . ▓ }],
+ [qw{. ▘ ▀ ▝ . ▌ █ ▐ . ▖ ▄ ▗ }],
[qw{. ▛ ▚ ▟ . ▙ ▞ ▜ }],
[qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ ▔ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▕ }],
[qw{. ▛ ▚ ▟ . ▙ ▞ ▜ }],
[qw{. ▁ ▂ ▃ ▄ ▅ ▆ ▇ ▔ . ▏ ▎ ▍ ▌ ▋ ▊ ▉ ▕ }],
- [qw{. □ ▣ ■ . ▤ ▦ ▥ . ▧ ▩ ▨}],
-
- 'Signs',
- [qw{. ¤ ¢ ₥ € £ ₨ $ ¥ . ₫ ₭ ₦ ₱ ₧ ₮ ₩ ₪}],
- [qw{. ♠ ♡ ♢ ♣ . ♤ ♥ ♦ ♧}],
- [qw{. ☉ ☿ ♀ ♁ ♂ ♃ ♄ ♅ ♆ ♇}], # solar
- [qw{. ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓}], # zodiac
'IPA',
[qw{
'IPA',
[qw{
@@
-225,14
+214,7
@@
print_glyph_tables(
.>Open a ɶ - - ɑ ɒ
}],
.>Open a ɶ - - ɑ ɒ
}],
- 'Alphabetics',
- [qw{
- .>Latin a ī ı ę ô ɳ ŋ ṡ š đ ð Ʒ
- .>Cyrillic а і й э ё н њ ш щ ч ь Я
- .>Greek α ί ϊ η ϋ π ψ σ ς θ ξ Ω
- .>Hebrew א ײ י ע ו נ ן ס ש ט צ ץ
- }],
-
+$verbose ? (
'Japanese',
[qw{
- A I U E O _
'Japanese',
[qw{
- A I U E O _
@@
-277,6
+259,7
@@
print_glyph_tables(
.>P パ ピ プ ペ ポ
.>V ヷ ヸ ヴ ヹ ヺ
}],
.>P パ ピ プ ペ ポ
.>V ヷ ヸ ヴ ヹ ヺ
}],
+) : (),
);
:></div>
);
:></div>
@@
-292,11
+275,13
@@
print_glyph_tables(
</div>
<p class="footer">
</div>
<p class="footer">
- <a href="/" rel="home">sheet.shiar.nl</a>/unicode
- <a href="git://git.shiar.nl/sheet" rel="vcs-git" title="Git repository"><:= $VERSION :></a>
+ <a href="/" rel="home">sheet.shiar.nl</a>/unicode.<a href="/source/unicode.plp"
+ rel="code" title="Written in Perl">plp</a>
+ <a href="http://git.shiar.nl/sheet.git/history/HEAD:/unicode.plp"
+ rel="vcs-git" title="Git repository"><:= $VERSION :></a>
created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
- <a
title="Licensed under the GNU Affero General Public License, version 3
" rel="copyright"
-
href="http://www.fsf.org/licensing/licenses/agpl-3.0.html
">AGPLv3</a>
+ <a
href="http://www.fsf.org/licensing/licenses/agpl-3.0.html
" rel="copyright"
+
title="Licensed under the GNU Affero General Public License, version 3
">AGPLv3</a>
</p>
</html>
</p>
</html>