package asahi;
import tool.*;
public class pro {
int s,datanumber;
String[] data=new String[5000];
String[] subdata=new String[5000];
String[] t=new String[5000];
public static void main(String[] args) {
pro te=new pro();
}
pro(){
int tr;
for(tr=1;tr<548;tr++){
readfile sub2=new readfile();
sub2.makedata("data/"+tr+".txt","UTF-8");
data=sub2.data;
datanumber=sub2.datanumber;
for(s=1;s<datanumber+1;s++){
if(data[s].indexOf("<title>")>-1)t[tr]=data[s];
}
int s1=0;
for(s=1;s<datanumber+1;s++){
if(data[s].indexOf("mokuji-full")>-1)s1=s;
}
int s2=0;
for(s=s1;s<datanumber+1;s++){
int h=0;
if(data[s].indexOf("btn-box")>-1)h=h+1;
if(s2==0)h=h+1;
if(h==2)s2=s;
}
int sx=0;
for(s=s1;s<s2;s++){
sx=sx+1;
subdata[sx]=change(data[s]);
}
writefile sub3=new writefile();
sub3.data=subdata;
sub3.datanumber=sx;
sub3.makedata("gdata/"+tr+".txt");
}
for(tr=1;tr<780;tr++){
System.out.println(t[tr]);
}
}
String change(String str){
int n;
for(n=1;n<11;n++){
str=rev(str);
}
str=str.replace(" ","");
return str;
}
String rev(String str){
if(str==null)str="";
int p1=str.indexOf("<");
int p2=str.indexOf(">",p1);
String strx="";
if(p2>-1)strx=str.substring(p1,p2+1);
str=str.replace(strx,"");
return str;
}
}
最終更新:2016年07月10日 06:30