<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>lizongbo at 618119.com &#187; epub</title>
	<atom:link href="http://618119.com/tag/epub/feed" rel="self" type="application/rss+xml" />
	<link>http://618119.com</link>
	<description>工作,生活,java,apache,tomcat,Resin,mina,Hessian,Openfire,XMPP,RPC,Ubuntu</description>
	<lastBuildDate>Sat, 21 Aug 2010 08:34:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>使用epub-tools抓取网页生成epub电子书，用epubcheck进行校验</title>
		<link>http://618119.com/archives/2010/03/04/162.html</link>
		<comments>http://618119.com/archives/2010/03/04/162.html#comments</comments>
		<pubDate>Thu, 04 Mar 2010 15:03:03 +0000</pubDate>
		<dc:creator>lizongbo</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[epub]]></category>

		<guid isPermaLink="false">http://618119.com/?p=162</guid>
		<description><![CDATA[最近在看epub格式的电子书，于是对epub格式的电子书有一点了解。
然后下载了epub-tools和epubcheck的代码，写了个小程序，通过分析网上小说主页和章节内容，然后生成epub格式的电子书。
epub-tools 来源：http://code.google.com/p/epub-tools/
epubcheck来源：http://code.google.com/p/epubcheck/
部分代码如下:
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;
package com.lizongbo.epub;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import com.adobe.dp.epub.io.DataSource;
/**
*网上图片的数据源
*/
public class ImgFileUrlDataSource extends DataSource {
String url;
public ImgFileUrlDataSource(String url) {
this.url = url;
}
public InputStream getInputStream() throws IOException {
return new URL(url).openStream();
}
}
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;
package com.lizongbo.epub;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import com.adobe.dp.epub.io.BufferedDataSource;
import com.adobe.dp.epub.io.OCFContainerWriter;
import com.adobe.dp.epub.io.StringDataSource;
import com.adobe.dp.epub.ncx.TOCEntry;
import com.adobe.dp.epub.opf.BitmapImageResource;
import com.adobe.dp.epub.opf.NCXResource;
import com.adobe.dp.epub.opf.OPSResource;
import com.adobe.dp.epub.opf.Publication;
import com.adobe.dp.epub.opf.Resource;
import com.adobe.dp.epub.ops.Element;
import com.adobe.dp.epub.ops.OPSDocument;
import com.adobe.epubcheck.api.EpubCheck;
import com.adobe.epubcheck.api.Report;
import com.adobe.epubcheck.util.DefaultReportImpl;
import javax.imageio.ImageIO;
/**
* 从网上抓取网页下来，打包成epub
* 书目录url：
* 参考 [...]]]></description>
		<wfw:commentRss>http://618119.com/archives/2010/03/04/162.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
