アットウィキロゴ

gut55

package copy;
 
import java.io.*;
 
public class pro {
 
    int s,datanumber;
    String[] data=new String[5000];
String[] name=new String[5000];
String[] code=new String[5000];
String[] imx=new String[5000];
 
 
    public static void main(String[] args) {
        pro r=new pro();
    }
    pro(){
 
 
 
 
 
 
 
 
 
 
        int tr=2010;
     for(tr=2001;tr<2014;tr++){
 
          readx("sample.js");
 
       for(s=1;s<datanumber+1;s++){
       data[s]=data[s].replace("yy",""+tr);
       }
 
       writexml("data/sample"+tr+".js"); 
 
    }
 
 
 
 
        for(tr=2001;tr<2014;tr++){
 
            readx("index.html");
 
        String de="sample"+tr+".js";    
 
       for(s=1;s<datanumber+1;s++){
       data[s]=data[s].replace("消費活動指数",tr+"年");
       data[s]=data[s].replace("sample.js",de);
       }
 
       writexml("data/play"+tr+".html"); 
 
      } 
 
           readx("page.html");
 
 
 
           String mx="";
          for(tr=2001;tr<2014;tr++){
     String str4="play"+tr;
       mx=mx+"<a href=\""+str4+".html\">"+tr+"年</a><br>";
                }    
 
 
          for(s=1;s<datanumber+1;s++){
       data[s]=data[s].replace("memo",mx);
       }
 
 
 
 
     writexml("data/index.html");      
 
 
 
 
 
 
 
 
    }
 
      void writexml(String file){ 
 
    int s,sx;
 
try{ 
PrintWriter pw = new PrintWriter (new BufferedWriter(new FileWriter(file))); 
 
for(s=1;s<datanumber+1;s++){   
   pw.println(data[s]); 
}
 
 
 
System.out.println("ファイルに書きこみました。"); 
pw.close(); 
} catch(IOException ep){ System.out.println("入出力エラーです。"); } 
 
 
} 
 
 
 
      void readx(String file){
 
String str;
BufferedReader br;  
int s;
s=0;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8"));  
while((str = br.readLine()) != null) {  
s=s+1;
data[s]=str;  
}
br.close();
} catch (IOException e) {System.out.println(e);}  
 
datanumber=s;
 
} 
 
}
 
最終更新:2016年09月10日 10:22