アットウィキロゴ

wiki2

import java.io.*;

class pro{

String file;
String bun,urlx,word,day,str;
int s,sx,tx,tr;
String[] point=new String[100];
String[] name=new String[60];
String[] p=new String[10000];
String[] y=new String[10000];
String[] m=new String[10000];
String[] d=new String[10000];
int pointnumber;
int xnumber;
int h,year,month,count;

public static void main(String [] args) {
        pro test=new pro();
            }
pro(){

name sub2=new name();
sub2.makedata();
name=sub2.name;

for(tr=57;tr<58;tr++){

word="木崎ゆりあ";

count=0;
year=2007;
month=12;

sx=0;
while(count<50){

month=month+1;
if(month>12)year=year+1;
if(month>12)month=1;

tx=100*year+month;

day="";
day=day+tx;

count sub=new count();
sub.makedata(word,day);
point=sub.point;
pointnumber=sub.pointnumber;

for(s=1;s<pointnumber+1;s++){
sx=sx+1;
y[sx]="";
m[sx]="";
d[sx]="";
y[sx]=y[sx]+year;
m[sx]=m[sx]+month;
d[sx]=d[sx]+s;
p[sx]=point[s];
}

h=0;
if(month==8)h=h+1;
if(year==2011)h=h+1;
if(h==2)count=100;
}

file="data/";
file=file+word;
file=file+".txt";
writefile(file);

}


}

void writefile(String file){

try{
PrintWriter pw = new PrintWriter (new BufferedWriter(new FileWriter(file)));

for(s=1;s<sx+1;s++){
pw.print("<year>");
pw.print(y[s]);
pw.print("</year>");
pw.print("<month>");
pw.print(m[s]);
pw.print("</month>");
pw.print("<day>");
pw.print(d[s]);
pw.print("</day>");
pw.print("<point>");
pw.print(p[s]);
pw.println("</point>");
}
  
System.out.println("ファイルに書きこみました。");
pw.close();
} catch(IOException ep){ System.out.println("入出力エラーです。"); }


}






}
最終更新:2011年09月28日 22:29