package epub3;
import java.io.File;
public class pro {
String[] data=new String[5000];
int s,datanumber;
String[] book=new String[5000];
int number_book;
public static void main(String[] args) {
pro test=new pro();
}
pro(){
File f=new File("book");
String[] ff=f.list();
for(s=1;s<ff.length;s++){
book[s+1]=ff[s].replace(".txt","");
}
number_book=ff.length;
data[1]="<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
data[2]="<package xmlns=\"http://www.idpf.org/2007/opf\"";
data[3]="version=\"3.0\" xml:lang=\"ja\" unique-identifier=\"unique-id\"";
data[4]="prefix=\"ebpaj: http://www.ebpaj.jp/\">";
data[5]="<metadata xmlns:dc=\"http://purl.org/dc/elements/1.1/\">";
String t="";
data[6]="<dc:title id=\"title\">"+t+"</dc:title>";
String a="";
data[7]="<dc:creator id=\"creator01\">"+a+"</dc:creator>";
String p="";
data[8]="<dc:publisher id=\"publisher\">"+p+"</dc:publisher>";
data[9]="<dc:language>ja</dc:language>";
data[10]="<meta property=\"ebpaj:guide-version\">1.1.3</meta>";
data[11]="</metadata>";
data[12]="<manifest>";
data[13]="<item media-type=\"application/xhtml+xml\" id=\"toc\" href=\"navigation-documents.xhtml\" properties=\"nav\"/>";
data[14]="<item media-type=\"text/css\" id=\"book-style\" href=\"style/book-style.css\"/>";
data[15]="<item media-type=\"text/css\" id=\"style-reset\" href=\"style/style-reset.css\"/>";
data[16]="<item media-type=\"text/css\" id=\"style-standard\" href=\"style/style-standard.css\"/>";
data[17]="<item media-type=\"text/css\" id=\"style-advance\" href=\"style/style-advance.css\"/>";
data[18]="<item media-type=\"text/css\" id=\"style-check\" href=\"style/style-check.css\"/>";
data[19]="<item media-type=\"image/jpeg\" id=\"cover\" href=\"image/cover.jpg\" properties=\"cover-image\"/>";
int sx=19;
for(s=1;s<number_book+1;s++){
sx=sx+1;
data[sx]="<item media-type=\"application/xhtml+xml\" id=\""+book[s]+"\" href=\"xhtml/"+book[s]+".xhtml\"/>";
}
sx=sx+1;
data[sx]="</manifest>";
sx=sx+1;
data[sx]="<spine page-progression-direction=\"rtl\">";
sx=sx+1;
data[sx]="<itemref linear=\"yes\" idref=\"p-cover\"/>";
sx=sx+1;
data[sx]="<itemref linear=\"yes\" idref=\"p-fmatter-001\" />";
sx=sx+1;
data[sx]="<itemref linear=\"yes\" idref=\"p-titlepage\" />";
sx=sx+1;
data[sx]="<itemref linear=\"yes\" idref=\"p-caution\"/>";
sx=sx+1;
data[sx]="<itemref linear=\"yes\" idref=\"p-toc\"/>";
for(s=1;s<number_book+1;s++){
sx=sx+1;
data[sx]="<itemref linear=\"yes\" idref=\""+book[s]+"\"/>";
}
sx=sx+1;
data[sx]="</spine>";
sx=sx+1;
data[sx]="</package>";
datanumber=sx;
}
}
最終更新:2015年11月07日 10:58