X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/b5b60a0ee0f90c2895e1e4e27926840ea29c2be7..c7530c743eb2d8f45167ae0a9ed641559a4d550e:/tools/mkwordlist diff --git a/tools/mkwordlist b/tools/mkwordlist index 78e36b6a..6555246 100755 --- a/tools/mkwordlist +++ b/tools/mkwordlist @@ -13,8 +13,9 @@ use Data::Dump 'pp'; my %rows; if (my $lang = shift @ARGV) { my %filter = (lang => $lang); - my $cols = "ref, array_to_string(form || alt, '/'), prio + coalesce(grade, 90) / 100::float, id, cat"; - %rows = $db->select(_word_ref => $cols, \%filter)->map_arrays; + my $cols = "ref, array_to_string(form || alt, '/'), prio, id, sub"; + %rows = $db->select(_word => $cols, \%filter)->map_arrays; + defined $_->[-1] or pop @$_ for values %rows; say pp \%rows =~ s/\\x\{([0-9A-F]+)\}/chr hex $1/ger; exit;