15 print STDERR "usage: yu2.PL [--yubin=KEN_ALL.CSV] [--jigyosho=JIGYOSYO.CSV] [--ime={canna|wnn}]
17 If you want see more detail, type 'pod2text yu2.PL'.
22 sub printCANNAyubin($$)
24 my ($seven, $jusho) = @_;
25 print "${seven} \#CN ${jusho}\n";
28 sub printCANNAjigyosho($$$)
30 my ($seven, $jigyosho, $jusho) = @_;
31 print "${seven} \#CN ${jigyosho} ${jusho}\n";
36 my ($seven, $jusho) = @_;
37 $seven =~ tr/0123456789/0123456789/;
38 print "${seven} ${jusho} 地名 0\n";
41 sub printWNNjigyosho($$$)
43 my ($seven, $jigyosho, $jusho) = @_;
44 $seven =~ tr/0123456789/0123456789/;
45 print "${seven} ${jigyosho} 地名 0\n";
46 print "${seven} ${jusho} 地名 0\n";
50 my ($yubin, $jigyosho, $ime) = ('./KEN_ALL.CSV', './JIGYOSYO.CSV', CANNA);
53 "jigyosho=s" => \$jigyosho,
57 my ($printlineYubin, $printlineJigyosho)
58 = (\&printCANNAyubin, \&printCANNAjigyosho);
60 $printlineYubin = \&printWNNyubin;
61 $printlineJigyosho = \&printWNNjigyosho
62 } elsif ("$ime" eq CANNA) {
66 binmode STDOUT, ':encoding(EUC-JP)';
69 binmode CSV, ':encoding(Shift_JIS)';
72 my @tmp = split (/\,/, $_);
73 &$printlineYubin($tmp[2], "$tmp[6]$tmp[7]$tmp[8]");
78 binmode CSV, ':encoding(Shift_JIS)';
81 my @tmp = split (/\,/, $_);
82 &$printlineJigyosho("$tmp[7]", "$tmp[2]", "$tmp[3]$tmp[4]$tmp[5]$tmp[6]");
91 yu2.PL - convert Japanese ZIP codes CSV files to Canna|(Free)Wnn's dictionary
95 yu2.PL [--yubin=KEN_ALL.CSV] [--jigyosho=JIGYOSYO.CSV] [--ime={canna|wnn}]
99 The yu2.PL is a program for converting from Japanese ZIP codes CSV files
100 to Canna|(Free)Wnn readable CSV files.
102 Japanese ZIP codes CSV files can get from JAPAN POST Co., Ltd.'s Web pages.
106 L<http://www.post.japanpost.jp/zipcode/dl/kogaki-zip.html>
107 L<http://www.post.japanpost.jp/zipcode/dl/jigyosyo/index-zip.html>
111 =head2 --yubin=F<KEN_ALL.CSV>
113 Specify ZIP codes file.
115 =head2 --jigyosho=F<JIGYOSYO.CSV>
117 Specify office ZIP codes file.
119 =head2 --ime={canna|wnn}
129 =head2 F<KEN_ALL.CSV>
132 L<http://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip>.
134 =head2 F<JIGYOSYO.CSV>
137 L<http://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip>.
141 mkbindic(1), atod(1), L<http://www.post.japanpost.jp/zipcode/dl/readme.html>,
142 L<http://www.post.japanpost.jp/zipcode/dl/jigyosyo/readme.html>
146 2001 Yoshito Komatsu <ykomatsu@akaumigame.org>
148 2014, 2015 Mitsutoshi NAKANO <bkbin005@rinku.zaq.ne.jp>
152 This program is free software; you can redistribute it and/or modify it under
153 the terms of the GNU General Public License as published
154 by the Free Software Foundation; either version 2 of the License,
155 or (at your option) any later version.
157 This program is distributed in the hope that it will be useful,
158 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
159 or FITNESS FOR A PARTICULAR PURPOSE.
160 See the GNU General Public License for more details.
162 You should have received a copy of the GNU General Public License along
163 with this program; if not, write to
164 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,