X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/e3a886c4660977226601b4ab33490272e62efe36..f83543143581c2256a4f217746713a0b3c03a5c0:/digits.plp?ds=inline
diff --git a/digits.plp b/digits.plp
index bc43593..a55b49a 100644
--- a/digits.plp
+++ b/digits.plp
@@ -13,6 +13,11 @@ Html({
)],
stylesheet => [qw( light dark circus mono red )],
data => [qw'writing-digits.inc.pl'],
+ raw => <<'EOT',
+
+EOT
});
:>
@@ -24,7 +29,6 @@ in various writing systems.
<:
-use List::Util qw( pairs );
use Shiar_Sheet::FormatChar 1.08;
my $glyphs = Shiar_Sheet::FormatChar->new;
unless (exists $get{v}) {
@@ -33,21 +37,23 @@ unless (exists $get{v}) {
$glyphs->{style} = 'univer';
}
-my $scriptname = do 'writing-script.inc.pl';
-$_ = qq{
$_} for $scriptname->{latn} || ();
+my $scriptname = eval { Data('writing-script') };
+$_ = showlink($_, "/latin") for $scriptname->{latn} || ();
-my @table = do "writing-digits.inc.pl";
-die "Table data not found: $_\n" for $@ || $! || ();
+my $table = Data("writing-digits");
-say $glyphs->tabletag;
-for my $row (pairs @table) {
- my ($id, $info) = @{$row};
- my $title = $info->{title} // $scriptname->{$id} || $id;
- print $glyphs->row([ ".>$title", @{$info->{list}} ]);
+sub printtable {
+ say '
', $glyphs->tabletag;
+ for my $id (@_) {
+ my $info = $table->{$id};
+ my $title = $info->{title} // $scriptname->{$id} || $id;
+ print $glyphs->row([ ".>$title", @{$info->{list}} ]);
+ }
+ say '
';
}
-say '';
-:>
+printtable(@{ $table->{$_} }) for @{ $table->{default} };
-
+say "\n";
+say for '
', $glyphs->legend;