digraphs: update mkdigraphlist input description
[sheet.git] / tools / mkdigraphlist
index 4af35901004c4fb1d57d681d70bc7dc1ee26ce3f..0714a2b1b64e15ff37e31a7faca36a6088b5d749 100755 (executable)
@@ -5,7 +5,6 @@ use warnings;
 use utf8;
 
 use open OUT => ':utf8', ':std';
-use Data::Dumper;
 
 our $VERSION = '1.03';
 
@@ -16,7 +15,9 @@ my $di = do 'data/digraphs-rfc.inc.pl'
 # personal addendums
 my $extra = do 'data/digraphs-shiar.inc.pl'
        or warn "could not include shiar proposals: ", $@ // $!;
-$di = { %{$di}, %{$extra // {}} };
+my $vim = do 'data/digraphs-vim.inc.pl'
+       or warn "could not include vim extensions ", $@ // $!;
+$di = { %{$vim // {}}, %{$di}, %{$extra // {}} };
 
 # optionally get unicode character information
 my $uninfo = do 'unicode-char.inc.pl'
@@ -35,6 +36,7 @@ print "# automatically generated by $0\n";
 print "use utf8;\n";
 print "+{\n";
 printf '(map {$_=>0} qw{%s}),'."\n", join(' ',
+       grep { !defined $di->{$_} }
        map { substr($_, 1, 1).substr($_, 0, 1) } sort keys %{$di}
 );
 printf "q{%s}=>[%s],\n", $_, join(',',
@@ -56,11 +58,8 @@ mkdigraphlist - Output character list of combined digraph data
 
 =head1 DESCRIPTION
 
-Parses the official RFC-1345 document, searching the
-'character mnemonic table' for all digraph definitions.
-If successful, Perl code is output resulting in a hash
-with character data keyed by digraph.
-Any errors and warnings are given at STDERR.
+Combines precompiled digraph includes of rfc (1345), vim, and shiar
+and outputs a complete map including character details and usage classes.
 
 The value can either be a scalar string containing another
 digraph which can be considered identical (usually inverted),