git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
keyboard/altgr/index: label modes by description character.
[sheet.git]
/
tools
/
mkcountries-geonames
diff --git
a/tools/mkcountries-geonames
b/tools/mkcountries-geonames
index 209653e1818c1385d0b0bb9af4140ed0ff550f9c..09158634dd12f7381653c62d0e6779a82ea4e2d7 100755
(executable)
--- a/
tools/mkcountries-geonames
+++ b/
tools/mkcountries-geonames
@@
-86,15
+86,17
@@
for (values %cc) {
s/(?<=.)\(.*\)\s*//;
s/ republic\b//gi;
s/ islands?\b//gi;
s/(?<=.)\(.*\)\s*//;
s/ republic\b//gi;
s/ islands?\b//gi;
- s/\bthe //g;
+ s/\bthe //g
i
;
s/ and / & /g and s/(?<=.)[a-z ]+//g;
s/ of / /g;
s/\bsa?int /st /gi;
s/ and / & /g and s/(?<=.)[a-z ]+//g;
s/ of / /g;
s/\bsa?int /st /gi;
- s/Un
ited /Un
. /gi;
+ s/Un
\Kited /
. /gi;
s/South(?:ern)? /S-/g;
s/North(?:ern)? /N-/g;
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/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])((?<!Austr)(?!land)\w{2,})/$1./g; # abbreviate (at consonant)
$_;
};
s/(\S{4}[b-df-hj-np-tv-xz])((?<!Austr)(?!land)\w{2,})/$1./g; # abbreviate (at consonant)
$_;
};