アットウィキロゴ

u6

package info2;
 
import java.io.File;
import tool.*;
 
 
public class pro {
 
     int s,datanumber;
    String[] data=new String[5000];
 
   String[] name=new String[50000];
     String[] credit=new String[50000];
        String[] v=new String[50000];
 
        String[] sta=new String[50000];
        String[] term=new String[500];
        String[] time=new String[500];
 
    public static void main(String[] args) {
        pro te=new pro();
    }
    pro(){
 
        File f=new File("gdata");
        String[] ff=f.list();
 
        int tr;
        for(tr=0;tr<ff.length;tr++){
           readfile sub4=new readfile();
   sub4.makedata("gdata/"+ff[tr],"UTF-8");
   data=sub4.data;
   datanumber=sub4.datanumber;  
 
   name[tr]=ff[tr].replace(".txt","");
 
 
for(s=1;s<datanumber+1;s++){
String[] x=data[s].split("△");
credit[s]="";
if(x.length>1)credit[s]=x[0];
v[s]="";
if(x.length>1)v[s]=x[1];
sta[s]="";   
}
 
int sx=0;
for(s=1;s<datanumber+1;s++){
if(credit[s].indexOf("制作局")>-1)sx=sx+1;    
if(credit[s].indexOf("制作局")>-1)sta[sx]=v[s]; 
}
 
int number_sta=sx;        
 
sx=0;
for(s=1;s<datanumber+1;s++){
if(credit[s].indexOf("放送期間")>-1)sx=sx+1;    
if(credit[s].indexOf("放送期間")>-1)term[sx]=v[s]; 
}
 
int number_term=sx;      
 
 
sx=0;
for(s=1;s<datanumber+1;s++){
if(credit[s].indexOf("放送時間")>-1)sx=sx+1;    
if(credit[s].indexOf("放送時間")>-1)time[sx]=v[s]; 
}
 
int number_time=sx;    
if(number_sta==1){
for(s=1;s<number_term+1;s++){
System.out.println(name[tr]+","+sta[1]+","+term[s]+","+time[s]);
}
}
 
if(number_sta>1){
for(s=1;s<number_term+1;s++){
System.out.println(name[tr]+","+sta[s]+","+term[s]+","+time[s]);
}
}
 
 
 
        }
 
 
 
 
 
    }
 
 
 
 
}
 
最終更新:2016年09月05日 01:41