アットウィキロゴ

めすお

package delta;
 
import tool.*;
import epub2.epub_kadokawa;
 
public class pro {
 
 
 
        int s,datanumber;
    String[] data=new String[5000];
     String[] subdata=new String[5000];
   int numberx;
   String titlex;  
    String[] link=new String[5000];
 
  int number;
  String[] subtitle=new String[250];
  String[][] page=new String[200][50000];
  String[] subx=new String[50000];
  String title,author;  
  int[] subnumber=new int[200];  
    int year,month,day;
 
    public static void main(String[] args) {
        pro te=new pro();
    }
    pro(){
 
         int sx=0; 
        int p;
      int tr;
        for(tr=1;tr<205;tr++){
 
 String urlx="http://otokonomesuochi.blog.fc2.com/blog-entry-"+tr+".html";
 
 
 String str1="entry-content clearfix";
 
   getdata sub2=new getdata();
   sub2.makedata(urlx,"UTF-8");
   data=sub2.data;
   datanumber=sub2.datanumber;
 
 title="";
   for(s=1;s<datanumber+1;s++){
 if(data[s].indexOf("entry-title")>-1)title=data[s];
 }
 
 title=change(title);  
 
 System.out.println(tr+","+title);
 
 String str="";  
 for(s=1;s<datanumber+1;s++){
 if(data[s].indexOf(str1)>-1)str=data[s+1];
 }
 str=str.replace("<br />","△");
 str=change(str);         
 
 String[] x=str.split("△");
 
 sx=0;
 for(s=0;s<x.length;s++){
 sx=sx+1;
 page[1][sx]=x[s];
    }
 subnumber[1]=sx;
 subtitle[1]=title;
 
 
        author="のぞみ";
        year=28;
        month=12;
        day=5;
 
        number=1;
 
            epub_kadokawa sub18=new epub_kadokawa();
            sub18.page=page;
            sub18.number=number;
            sub18.subnumber=subnumber;
            sub18.subtitle=subtitle;
            sub18.title=title;
            sub18.author=author;
            sub18.year=year;
            sub18.month=month;
            sub18.day=day;
            sub18.makedata("data/"+title+".kepub.epub");
        }
 
 
}
 
 
  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="";
 
        int h=0;
        if(p1>-1)h=h+1;
        if(p2>-1)h=h+1; 
        if(h==2)strx=str.substring(p1,p2+1);
        str=str.replace(strx,"");
 
        return str;
    }     
 
}
最終更新:2016年12月05日 19:17