X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/f317466f02efc2e41de372d9bfd4114ff9a7cd72..856d772d7f54045dbd78ef73f1d22c1bfe78e165:/tools/mkcountries-geonames diff --git a/tools/mkcountries-geonames b/tools/mkcountries-geonames index ddc963c..56f85c4 100755 --- a/tools/mkcountries-geonames +++ b/tools/mkcountries-geonames @@ -1,5 +1,5 @@ #!/usr/bin/env perl -use 5.012; +use 5.014; use warnings; my %cc; # map of country code to info array @@ -90,11 +90,13 @@ for (values %cc) { s/ and / & /g and s/(?<=.)[a-z ]+//g; s/ of / /g; s/\bsa?int /st /gi; - s/United /Un. /gi; + s/Un\Kited /. /gi; s/South(?:ern)? /S-/g; s/North(?:ern)? /N-/g; + s/West(?:ern)? /W-/g; + s/East(?:ern)? /E-/g; s/New /n./g; - s/(\S)(\S+)-/$1-/g; # strip most chars preceding dash + s/(\w)(\w+)-/$1-/g; # strip most chars preceding dash s/(\S{4}[b-df-hj-np-tv-xz])((?