EPUB Reader on your website.
-
How to setup & read/publish EPUB books (for users)
-
How to arrange development environment (for developers)
-
License
-
Special Thanks
-
How to setup & read/publish EPUB books
BiB/i supports two ways to read/publish EPUB books:
- Read in browsers on your local machine, or
- Publish on the web, to have your books read by someone.
In either case, download BiB/i from web site and unzip it at first.
- Open
bib/i/index.html
in your browser and - Drag an EPUB book and drop it into the window.
- That's all!
Demo.
You can publish both zipped archive and unzipped folder. (Using unzipped is highly recommended.)
- Upload
bib
directory to your web server, - Upload your EPUB books(for instance,
my-book.epub
here) tobib/bookshelf
directory, and - Access to
http://your.web.site/bib/i/?book=my-book.epub
by your browser. - Or embed code below into your blog and visit the blog entry.
<a href="http://your.web.site/somewhere/bib/i/?book=my-book.epub" data-bibi="embed" data-bibi-style="[[ CSS for embeded BiB/i, as you like ]]">My Great Book Title</a><script src="http://your.web.site/bib/i.js"></script>
You may also read EPUB books as unzipped archives, or by page-by-page access, by uploading unzipped EPUB books to bookshelf
directory.
This is recommended because it accelarates reading experience of your readers.
- Unzip an EPUB book,
- Change the file extension from
.epub
to.zip
(my-book.epub
->my-book.zip
) and then - unzip the file with some tool.
- Change the file extension from
- Upload it to
bib/bookshelf
directory, and - Visit
http://your.web.site/bib/i/?book=my-book
(note that it has No Extension) or embed code for it.
<a href="http://your.web.site/somewhere/bib/i/?book=my-book" data-bibi="embed" data-bibi-style="[[ CSS for embeded BiB/i, as you like ]]">My Great Book Title</a><script src="http://your.web.site/bib/i.js"></script>
- How to arrange development environment
- Node.js + npm - guide: “Download the installer” (or “Installing Node.js via package manager”)
- Ruby (+ RubyGems) - guide: “Installing Ruby” (+ “RubyGems Basics”)
- Bundler - how to install:
$ gem update --system
and$ gem install bundler
- Grunt - how to install:
$ npm install -g grunt-cli
... (“Getting Started”)
- Clone this repository. (https://github.com/satorumurmur/bibi/)
$ cd <the repository>
$ bundle install --path=vendor/bundle
->vendor/bundle
directory including RubyGems (Compass and dependent gems) is installed.$ npm install
->npm-modules
directory including modules is installed.
$grunt build
and renew these files. Or$ grunt
and start watching changes of files for development, and renew these files:bib/i/res/scripts/bibi.js
bib/i/res/styles/bibi.css
bib/i.js
bib/i.css
- Edit files.
- SCSS source files of
bib/i/res/styles/bibi.css
andbib/i/res/styles/pipi.css
are indev-bib/i/res/styles/
. - JavaScript source files of
bib/i/res/scripts/bibi.js
are indev-bib/i/res/scripts/
. - JavaScript source file of
bib/i.js
isdev-bib/i/res/scripts/pipi.js
.
- SCSS source files of
- Run web server for dynamic-compiling.
$ bundle exec rackup
- A server starts listening port 9292 by default.
- The server returns compiled CSS of dev-bib/styles/*.scss to request.
Following files are not watched or processed by Grunt tasks:
bib/i/index.html
(as portal)bib/i.js
(for embedding in HTML webpage)bib/manifest.json
(for using as Chrome application)- Files in
bib/presets/
(customisable settings and styles) - Files in
bib/i/res/fonts/
(icon fonts)
And bib/bookshelf/
directory is including .gitkeep
- License
- © Satoru MATSUSHIMA - http://bibi.epub.link/ or https://github.com/satorumurmur/bibi
- Licensed under the MIT license. - http://www.opensource.org/licenses/mit-license.php
- JSZip ... © Stuart Knightley (Dual licensed under the MIT license or GPLv3.)
- base64.js ... © dankogai (Licensed under the MIT license.)
- Native Promise Only ... © Kyle Simpson (Licensed under the MIT license.)
- Hammer.js ... © Jorik Tangelder (Licensed under the MIT license.)
- easing.js ... © Dan Rogers (Licensed under the MIT license.)
- sML ... © Satoru MATSUSHIMA (Licensed under the MIT license.)
- The Elegant Icon Font ... © Elegant Themes, Inc. (Dual licensed under the GPL 2.0 and the MIT license.)
- Special Thanks
- KITAITI Makoto ... @KitaitiMakoto
- Shunsuke Ito ... @shunito