OSDN Git Service

Using dh in debian/rules. lintian warned many, so rewrite rules.
[canna-yubin/canna-yubin.git] / yu2can.pl
1 #!/usr/bin/perl
2 #
3 # yu2can - convert CSV file to Canna dictionary
4 #
5 #          by Yoshito Komatsu <yoshito.komatsu@nifty.com>
6 #
7
8 $yubinfile = './ken_all.csv';
9 $jigyoshofile = './jigyosyo.csv';
10
11 open (CSV, $yubinfile);
12 while (<CSV>) {
13     $_ =~ tr/\"//d;
14     my ($seven, $jusho);
15     my @tmp;
16     @tmp = split (/\,/, $_);
17     $seven = $tmp[2];
18     print "${seven} \#CN ";
19     $jusho = $tmp[6] . $tmp[7] . $tmp[8];
20     print "${jusho}\n";
21 }
22 close (CSV);
23
24 open (CSV, $jigyoshofile);
25 while (<CSV>) {
26     $_ =~ tr/\"//d;
27     my ($seven, $jusho);
28     my @tmp;
29     @tmp = split (/\,/, $_);
30     $seven = $tmp[7];
31     print "${seven} \#CN ";
32     $jusho = $tmp[2] . " " . $tmp[3] . $tmp[4] . $tmp[5] . $tmp[6];
33     my $len = length ($jusho);
34     print "${jusho}\n";
35 }
36 close (CSV);