From 165a497847540665bc2e4063b3d73b6c7c36b1df Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 3 Apr 2017 13:38:14 +0200 Subject: [PATCH] writing: bramic section as separate subpage --- writing-brah.inc.pl | 10 ++++++++ writing-phnx.inc.pl | 20 +++++++++++++++ writing.plp | 59 ++++++++++++++++++--------------------------- 3 files changed, 54 insertions(+), 35 deletions(-) diff --git a/writing-brah.inc.pl b/writing-brah.inc.pl index 7a4ac8a..913716f 100644 --- a/writing-brah.inc.pl +++ b/writing-brah.inc.pl @@ -1,5 +1,15 @@ use utf8; { +title => 'brahmic', +pagetitle => 'brahmic scripts comparison sheet', +version => '1.0', +keywords => [qw( brahmic brahmi abugida )], +intro => <<'.', +Comparison of writing systems derived from the ancient Brahmi abugida. +Also see more distant relatives of Phoenician, +including the Latin alphabet. +See charsets for other characters. +. list => [qw( iso ipa orya beng deva gujr guru tibt sidd diff --git a/writing-phnx.inc.pl b/writing-phnx.inc.pl index 33ff588..e16f8da 100644 --- a/writing-phnx.inc.pl +++ b/writing-phnx.inc.pl @@ -1,5 +1,25 @@ use utf8; { +title => 'phoenician-derived', +pagetitle => 'writing system inheritance sheet', +version => '1.3', +keywords => [qw' + phoenician proto-canaanite hebrew latin greek aramaic arabic + abjad related derived descendant +'], +description => [ + "Character comparison,", + "tracking letters as they evolve from Phoenician to modern scripts.", + "Good Unicode test sample.", +], +intro => <<'.', +Comparison of Unicode letters in related alphabets. +There are more detailed pages of Latin +and Brahmic scripts. +Also see charsets +and common characters. +. + list => [qw( latn -runr -ital -goth -copt cyrl -perm -lyci grek -cari -lydi phnx -egyp -samr -armi hebr -sarb ethi -narb -nbat arab diff --git a/writing.plp b/writing.plp index 2c67ae0..a12c1f9 100644 --- a/writing.plp +++ b/writing.plp @@ -1,32 +1,32 @@ <(common.inc.plp)><: +my $source = lc $Request || 'phnx'; +$source =~ s/^brah\Kmi$//; +my $include = "writing-$source"; + +my $info = eval { Data($include) } || {}; + Html({ - title => 'writing system inheritance sheet', - version => '1.3', - description => [ - "Character comparison,", - "tracking letters as they evolve from Phoenician to modern scripts.", - "Good Unicode test sample.", - ], - keywords => [qw' - script glyph unicode writing comparison character alphabet letter - history phoenician latin sample test language multilingual - '], + title => $info->{pagetitle} || "$info->{title} scripts comparison sheet", + version => $info->{version} || '0.1', + description => $info->{description}, + keywords => [@{ $info->{keywords} // []}, qw( + writing script glyph unicode character letter comparison history + alphabet sample test language multilingual + )], stylesheet => [qw'light circus dark red mono'], - data => [qw'writing-phnx.inc.pl'], + data => ["$include.inc.pl"], }); -:> -

Writing systems

+my $rows = $info->{list} or Abort( + "Requested script parent $source not available", + '404 request not found', +); -

-Comparison of Unicode letters in related alphabets. -Also see charsets -and common chars.

+say "

\u$info->{title} scripts

"; +say "

$_

" for $info->{intro} || (); +say '
'; -
- -<: use Shiar_Sheet::FormatChar; my $glyphs = Shiar_Sheet::FormatChar->new; unless (exists $get{v}) { @@ -37,27 +37,16 @@ unless (exists $get{v}) { my $scriptname = eval { Data('writing-script') }; # optional translations $_ = showlink($_, "/latin") for $scriptname->{latn} || (); +$_ = showlink($_, "/writing/brahmi") for $scriptname->{brah} || (); -for ( - [phnx => 'Phoenician'], - [brah => 'Brahmi'], -) { - my ($source, $title) = @$_; - my $info = eval { Data("writing-$source") } or do { - say "

$title

"; - printf "

%s: %s.

\n", @{$@}; - next; - }; - my $rows = $info->{list} or next; - $glyphs->print($title => [map { +say $glyphs->table([map { my $ref = $_; my $lead = s/^(-)// && $1; (map { ".>$lead$_" } $scriptname->{$source.'_'.$_} || $scriptname->{$_} || $_ ), @{ $info->{table}->{$ref} || [] } - } @{$rows}]); -} +} @{$rows}]); say "
\n"; -- 2.30.0