X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/b4ce208aa528529fbc34a035cf76b3f3e817e94a..94340f1100e0b3171e6d382b6bf9d304919683f4:/tools/mkcountries-geonames diff --git a/tools/mkcountries-geonames b/tools/mkcountries-geonames index 592ce75..fe1acb7 100755 --- a/tools/mkcountries-geonames +++ b/tools/mkcountries-geonames @@ -36,11 +36,24 @@ my %cc; # map of country code to info array wl => ["(Saint Lucia)", "c-na Xr", "(Saint Luc.)", 'lc'], wv => ["(Saint Vincent)", "c-na Xr", "(Saint Vin.)", 'vc'], yv => ["(Venezuela)", "c-sa Xr", undef, 've'], + + # WIPO, agreed not to use + ap => ["African Regional Industrial Property Organization", "c-af Xr", "ARIPO"], + bx => ["Benelux Office for Intellectual Property", "c-eu Xr", "BOIP"], + ef => ["European Community Patent Convention", "c-eu Xr", "CPC"], + em => ["European Trademark Office", "c-eu Xr", "OHIM"], + ep => ["European Patent Organization", "c-eu Xr", "EPOrg"], + ev => ["Eurasian Patent Organization", "c-as Xr", "EAPO"], + gc => ["Gulf Patent Office", "c-as Xr", "GCCPO"], + ib => ["International Bureau of WIPO", "Xr", "IB WIPO"], + oa => ["African Intellectual Property Organization", "c-af Xr", "OAPI"], + wo => ["World Intellectual Property Organization", "Xr", "WIPO"], ); while (<>) { /^#/ and next; # skip comments my ($iso, $name, $cont) = (split /\t/)[0, 4, 8]; + $cont =~ s/\AAN\z/aa/; # different antarctica abbreviation my $class = "c-\L$cont"; $cc{ lc $iso } = [ $name, $class ]; } @@ -56,7 +69,9 @@ for (values %cc) { s/ islands?\b//gi; s/\bthe //g; s/ and / & /g and s/(?<=.)[a-z ]+//g; - s/\bsaint /st /gi; + s/ of / /g; + s/\bsa?int /st /gi; + s/United /Un. /gi; s/South(?:ern)? /S-/g; s/North(?:ern)? /N-/g; s/New /n./g;