diff options
author | Jun-ichiro itojun Hagino <itojun@FreeBSD.org> | 1997-11-12 05:12:18 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@FreeBSD.org> | 1997-11-12 05:12:18 +0000 |
commit | ad0eaa14c61ed042a8b7255514523b6ac66b4a46 (patch) | |
tree | 19be8aaaa89bce34f38295603dee592596f2e92a /japanese/zipcodes/scripts | |
parent | Since we have S/Key in the base system, might as well suport it. (diff) |
japanese zipcode tables. includes both 3/5 digits form and 7 digits form.
just like /usr/share/misc/zipcodes.
Notes
Notes:
svn path=/head/; revision=8587
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 000000000000..a7f1b87dbe8a --- /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 000000000000..871814145b70 --- /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"; +} |