X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/987ab3466b164a9eb3061b5c35c6ae8c86e922a0..2a99bcdadec88d7483903e2c8420ad3e78fcb805:/digits.plp diff --git a/digits.plp b/digits.plp index 10625a5..2bef8f3 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,7 @@ in various writing systems.

<: -use Shiar_Sheet::FormatChar; +use Shiar_Sheet::FormatChar 1.08; my $glyphs = Shiar_Sheet::FormatChar->new; unless (exists $get{v}) { $glyphs->{unicode}--; @@ -35,13 +40,20 @@ unless (exists $get{v}) { my $scriptname = do 'writing-script.inc.pl'; $_ = qq{$_} for $scriptname->{latn} || (); -my @table = do "writing-digits.inc.pl"; +my $table = do "writing-digits.inc.pl"; die "Table data not found: $_\n" for $@ || $! || (); -print $glyphs->table([map { - ref $_ eq 'ARRAY' ? @{$_} : map { ".>$_" } - $scriptname->{"digits_$_"} || $scriptname->{$_} || $_ -} @table]); +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 '
'; +} + +printtable(@{ $table->{$_} }) for @{ $table->{default} }; :>