git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
writing: ordered list references to named rows
[sheet.git]
/
writing.plp
diff --git
a/writing.plp
b/writing.plp
index 2f08da63a3cd18d486fd7ccd97cc24eb24c85251..2c67ae058fc7ac5384884ad821b40d26f57b28c6 100644
(file)
--- a/
writing.plp
+++ b/
writing.plp
@@
-2,7
+2,7
@@
Html({
title => 'writing system inheritance sheet',
Html({
title => 'writing system inheritance sheet',
- version => '1.
2
',
+ version => '1.
3
',
description => [
"Character comparison,",
"tracking letters as they evolve from Phoenician to modern scripts.",
description => [
"Character comparison,",
"tracking letters as they evolve from Phoenician to modern scripts.",
@@
-35,7
+35,7
@@
unless (exists $get{v}) {
$glyphs->{style} = 'univer';
}
$glyphs->{style} = 'univer';
}
-my $scriptname =
do 'writing-script.inc.pl';
+my $scriptname =
eval { Data('writing-script') }; # optional translations
$_ = showlink($_, "/latin") for $scriptname->{latn} || ();
for (
$_ = showlink($_, "/latin") for $scriptname->{latn} || ();
for (
@@
-43,17
+43,20
@@
for (
[brah => 'Brahmi'],
) {
my ($source, $title) = @$_;
[brah => 'Brahmi'],
) {
my ($source, $title) = @$_;
- my @table = do "writing-$source.inc.pl";
- if ($! or $@) {
+ my $info = eval { Data("writing-$source") } or do {
say "<h2>$title</h2>";
say "<h2>$title</h2>";
- printf "<p>
Table data not found: <em>%s</em>.</p>\n", $@ || $!
;
+ printf "<p>
%s: <em>%s</em>.</p>\n", @{$@}
;
next;
next;
- }
+ };
+ my $rows = $info->{list} or next;
$glyphs->print($title => [map {
$glyphs->print($title => [map {
+ my $ref = $_;
my $lead = s/^(-)// && $1;
my $lead = s/^(-)// && $1;
-
ref $_ eq 'ARRAY' ? @$_ :
map { ".>$lead$_" }
+
(
map { ".>$lead$_" }
$scriptname->{$source.'_'.$_} || $scriptname->{$_} || $_
$scriptname->{$source.'_'.$_} || $scriptname->{$_} || $_
- } @table]);
+ ),
+ @{ $info->{table}->{$ref} || [] }
+ } @{$rows}]);
}
say "</div>\n";
}
say "</div>\n";