diff options
author | itojun <itojun@FreeBSD.org> | 1997-11-12 05:12:18 +0000 |
---|---|---|
committer | itojun <itojun@FreeBSD.org> | 1997-11-12 05:12:18 +0000 |
commit | dc9c3c2706648a4509bd4621421a5281be1e4be4 (patch) | |
tree | 81e18b7f35127aca5e2b4b60257ebec12c60eccb /japanese/zipcodes/scripts | |
parent | c7e0508b5510a3819129028bc7e6aaf3d9d8f258 (diff) | |
download | FreeBSD-ports-dc9c3c2706648a4509bd4621421a5281be1e4be4.zip FreeBSD-ports-dc9c3c2706648a4509bd4621421a5281be1e4be4.tar.gz |
japanese zipcode tables. includes both 3/5 digits form and 7 digits form.
just like /usr/share/misc/zipcodes.
Diffstat (limited to 'japanese/zipcodes/scripts')
-rw-r--r-- | japanese/zipcodes/scripts/gennew.pl | 16 | ||||
-rw-r--r-- | japanese/zipcodes/scripts/genold.pl | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/japanese/zipcodes/scripts/gennew.pl b/japanese/zipcodes/scripts/gennew.pl new file mode 100644 index 0000000..a7f1b87 --- /dev/null +++ b/japanese/zipcodes/scripts/gennew.pl @@ -0,0 +1,16 @@ +while (<>) { + s/"//g; + split(/,/, $_); + $_[2] =~ s/[ \t]//g; + $_[8] = '' if ($_[8] eq '以下に掲載がない場合'); + $zipstr = $_[6] . ' ' . $_[7] . ' ' . $_[8]; # uniq + $zipstr =~ s/[ \t]+$//; + $zip{$zipstr} = $_[2]; +} + +print "# Zip code:location\n"; +print "# 7 digits zipcode for japan, used since feb98.\n"; +foreach $i (sort {$zip{$a} cmp $zip{$b}} keys %zip) { + next if ($i eq ''); + print $zip{$i} . ':' . $i . "\n"; +} diff --git a/japanese/zipcodes/scripts/genold.pl b/japanese/zipcodes/scripts/genold.pl new file mode 100644 index 0000000..8718141 --- /dev/null +++ b/japanese/zipcodes/scripts/genold.pl @@ -0,0 +1,16 @@ +while (<>) { + s/"//g; + split(/,/, $_); + $_[1] =~ s/[ \t]//g; + $_[8] = '' if ($_[8] eq '以下に掲載がない場合'); + $zipstr = $_[6] . ' ' . $_[7] . ' ' . $_[8]; # uniq + $zipstr =~ s/[ \t]+$//; + $zip{$zipstr} = $_[1]; +} + +print "# Zip code:location\n"; +print "# 3 to 5 digits zipcode for japan, used until jan98.\n"; +foreach $i (sort {$zip{$a} cmp $zip{$b}} keys %zip) { + next if ($i eq ''); + print $zip{$i} . ':' . $i . "\n"; +} |