package x2;
import tool.*;
public class pro {
int s,datanumber;
String[] data=new String[500];
String[] team=new String[500];
String[] art=new String[500];
String[] code=new String[500];
String[] name=new String[500];
String[] codex=new String[500];
String[] data_csv=new String[50000];
public static void main(String[] args) {
pro t=new pro();
}
pro(){
readfile sub6=new readfile();
sub6.makedata("s.csv","UTF-8");
data=sub6.data;
datanumber=sub6.datanumber;
for(s=2;s<datanumber+1;s++){
String[] x=data[s].split(",");
int n=Integer.parseInt(x[0]);
if(data[s].indexOf("home")>-1)team[n]=x[2];
}
for(s=1;s<254;s++){
if(team[s].indexOf("巨人")>-1)team[s]="読売";
if(team[s].indexOf("DeNA")>-1)team[s]="横浜";
if(team[s].indexOf("ソフトバンク")>-1)team[s]="福岡";
if(team[s].indexOf("オリックス")>-1)team[s]="大阪";
if(team[s].indexOf("ロッテ")>-1)team[s]="千葉";
if(team[s].indexOf("楽天")>-1)team[s]="仙台";
if(team[s].indexOf("日本ハム")>-1)team[s]="札幌";
}
int tr;
int n=0;
for(tr=1;tr<254;tr++){
readfile sub5=new readfile();
sub5.makedata("m.csv","UTF-8");
data=sub5.data;
datanumber=sub5.datanumber;
int sx=0;
for(s=2;s<datanumber+1;s++){
String[] x=data[s].split(",");
if(x[1].indexOf(team[tr])>-1)sx=sx+1;
if(x[1].indexOf(team[tr])>-1)art[sx]=x[3];
if(x[1].indexOf(team[tr])>-1)code[sx]=x[0];
}
int number=sx;
readfile sub7=new readfile();
sub7.makedata("gdata/"+tr+".txt","UTF-8");
data=sub7.data;
datanumber=sub7.datanumber;
for(s=1;s<datanumber+1;s++){
String[] y=data[s].split(",");
int p1=y[1].indexOf("(");
if(p1>-1)y[1]=y[1].substring(0,p1);
name[s]=y[1];
codex[s]="△";
for(sx=1;sx<number+1;sx++){
if(art[sx].indexOf(y[1])>-1)name[s]=art[sx];
if(art[sx].indexOf(y[1])>-1)codex[s]=code[sx];
}
n=n+1;
data_csv[n]=tr+","+y[0]+","+name[s]+","+codex[s]+","+team[tr]+","+y[2]+","+y[3];
}
}
writefile d=new writefile();
d.data=data_csv;
d.datanumber=n;
d.makedata("ren.csv");
}
}
最終更新:2016年06月28日 13:04