source: named variables for vim output
[sheet.git] / writing.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'writing system inheritance sheet',
5         version => 'v1.0',
6         description => [
7                 "Character comparison,",
8                 "tracking letters as they evolve from Phoenician to modern scripts.",
9                 "Good Unicode test sample.",
10         ],
11         keywords => [qw'
12                 script glyph unicode writing comparison character alphabet letter
13                 history phoenician latin sample test language multilingual
14         '],
15         stylesheet => [qw'light dark red'],
16         data => [qw'writing-phnx.inc.pl'],
17 });
18
19 :>
20 <h1>Writing systems</h1>
21
22 <p>Also see <a href="/charset">charsets</a>
23 and <a href="/unicode">common chars</a>.</p>
24
25 <div class="section">
26
27 <:
28 use Shiar_Sheet::FormatChar;
29 my $glyphs = Shiar_Sheet::FormatChar->new;
30 unless (exists $get{v}) {
31         $glyphs->{unicode}--;
32         $glyphs->{anno}  = [];
33         $glyphs->{style} = 0;
34 }
35
36 my $scriptname = do 'writing-script.inc.pl';
37 $_ = qq{<a href="/latin">$_</a>} for $scriptname->{latn} || ();
38
39 for (
40         [phnx => 'Phoenician'],
41         [brah => 'Brahmi'],
42 ) {
43         my ($source, $title) = @$_;
44         my @table = do "writing-$source.inc.pl";
45         if ($! or $@) {
46                 print "<h2>$title</h2>\n";
47                 printf "<p>Table data not found: <em>%s</em>.</p>\n", $! || $@;
48                 next;
49         }
50         $glyphs->print($title => [map {
51                 ref $_ eq 'ARRAY' ? @$_ : map { ".>$_" }
52                         $scriptname->{$source.'_'.$_} || $scriptname->{$_} || $_
53         } @table]);
54 }
55
56 :></div>
57
58 <hr>
59