X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/987ab3466b164a9eb3061b5c35c6ae8c86e922a0..85b2e04d887f4d328d8991b4834a52fba3187426:/digits.plp diff --git a/digits.plp b/digits.plp index 10625a5..a6a684e 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}--; @@ -33,17 +38,23 @@ unless (exists $get{v}) { } my $scriptname = do 'writing-script.inc.pl'; -$_ = qq{$_} for $scriptname->{latn} || (); +$_ = showlink($_, "/latin") 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} }; -
+say "\n"; +say for '
', $glyphs->legend;