To read book on my PRS505 e-book reader, I write some tools. Now I collect these tools into IBSuite (Image Book Suite), and put that on sourceforge. You can download the source code from the git of sourceforge project. Hope that can be useful for somebody.
http://sourceforge.net/projects/ibsuite/
IBSUITE
ibsuite stands for image book suite. It contains a set of tools to convert ebook in various format (pdf, chm, html) into a set of images, reformat the images (crop, embold, divide, etc), and assemble the result images into a new ebook.
COMPONENTS
- ibhtml2img: convert html to image with xulrunner
- ibhtml2pdf: convert html to pdf with xulrunner
- iblineparser: parser input image, extract line information
- ibpdfinfo: get some meta-information from pdf file, such as title, author, table of contents etc.
- ibpy: python module, which is the driver of the whole system, it uses above programs to convert input file to image, extract line information from image, dilate image, and re-assemble lines into a new image, generate output e-book.
- ibtools: A set of utilities and tools, some of them are used internal by ibsuite, others are user command provided by ibsuite.
USAGE
The most important command of ibsuite is ibreformat, the basic usage is as follow:
ibreformat [options] <input file>
In most cases, something like following:
ibreformat -o <output file> <oprof> --pprof=<pprof> <input file>
Where <input file> is input file name,
<output file><iprof><pprof><pprof> <input file>
For chm file on PRS505:
ibchm2imb .chm
When it finishs, .imb will be generated, then
ibsuite -o -pprof=repage --oprof=prs505l .imb
INSTALL
Currently, only Linux is supported, but I think it may work on some unix enviroment (including cygwin on Windows) after some work. Currently only install from source code is supported.
Pre-requirement:
- gcc, g++, bash, make
- libfontconfig-dev, libnetpbm-dev, libgtk-dev
- python, python-imaging
- imagemagick
- for HTML/CHM support: python-chm, xulrunner
- for scanned book: unpaper
Build:
./configure [--prefix=]
make [PREFIX=] [NO_XUL=1]
Install:
# become root
make install [PREFIX=]