package book7;
import tool.*;
public class pro {
String[] data=new String[5000];
String[] title=new String[5000];
String[] pic=new String[5000];
int s,datanumber;
public static void main(String[] args) {
pro tes=new pro();
}
pro(){
readfile sub=new readfile();
sub.makedata("book.csv","UTF-8");
data=sub.data;
datanumber=sub.datanumber;
for(s=1;s<datanumber+1;s++){
String[] x=data[s].split(",");
title[s]=x[0];
pic[s]="";
if(x.length>1)pic[s]=x[1];
}
for(s=1;s<datanumber+1;s++){
String str="<section><h2>"+title[s]+"</h2>";
if(pic[s].indexOf("copy")>-1)str=str+"<img src=\"copy.png\" width=\"200\" height=\"200\">";
if(pic[s].indexOf("fire")>-1)str=str+"<img src=\"fire.png\" width=\"200\" height=\"200\">";
if(pic[s].indexOf("box")>-1)str=str+"<img src=\"box.png\" width=\"200\" height=\"200\">";
str=str+"</section>";
System.out.println(str);
}
}
}
最終更新:2015年06月12日 03:02