沙亜矢

package saya;
 
 
import tool.*; 
import simple.epub;
 
public class pro {
 
    int s,datanumber;
    String[] data=new String[5000];
     String[] memo=new String[5000];
 
 
     public  int number;
  public String[] subtitle=new String[250];
  public String[][] subdata=new String[200][50000];
  public String[] subx=new String[50000];
  public String title,author;  
  public int[] subnumber=new int[200];
 
 
    public static void main(String[] args) {
        pro t=new pro();
    }
 
    pro(){
 
   number=1;
    author="沙亜矢";
   title="甘い誘惑";
 
 
        int tr;
 
 
            String urlx="http://saayaworld.x.fc2.com/novels/017.html";
 
          getdata sub=new getdata();
   sub.makedata(urlx,"SJIS");
   data=sub.data;
   datanumber=sub.datanumber;
 
   int s1=0;
 
   for(s=1;s<datanumber+1;s++){
   int h=0;
   if(data[s].indexOf("entry_body")>-1)h=h+1;    
   if(s1==0)h=h+1; 
   if(h==2)s1=s;
  System.out.println(data[s]);
   }
   int s2=0;
   for(s=s1+1;s<datanumber+1;s++){
   int h=0;
   if(data[s].indexOf("entry_date")>-1)h=h+1;    
   if(s2==0)h=h+1; 
   if(h==2)s2=s;
   }
 
 
 
   int sx=0;
   for(s=s1;s<s2;s++){
   data[s]=change(data[s]);
   if(data[s].length()>0)sx=sx+1;
   if(data[s].length()>0)memo[sx]=data[s];
 
    }
 
 
 
 
   tr=1;
 
subnumber[tr]=sx-1;
subtitle[tr]=memo[1];   
 
System.out.println(subtitle[tr]);
System.out.println(subnumber[tr]);
 
for(s=1;s<sx;s++){
   subdata[tr][s]=memo[s+1];  
    }
 
 
 
 
epub sub2=new epub();
sub2.title=title;
sub2.author=author;
sub2.number=number;
sub2.subnumber=subnumber;
sub2.subdata=subdata;
sub2.subtitle=subtitle;
sub2.makedata(title+".kepub.epub");
 
 
 
 
 
 
 
    }
    String change(String str){
 
        int n;
        for(n=1;n<51;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年11月01日 22:28