BiB/i
EPUB Reader on your website.
-
How to setup & read/publish EPUB books (for users)
-
How to arrange development environment (for developers)
-
License
-
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.
Read in browsers on your local machine
- Open
bib/i/index.html
in your browser and - Drag an EPUB book and drop it into the window.
- That's all!
Publish on the web
Demo.
You can publish both zipped archive and unzipped folder. (Using unzipped is highly recommended.)
Use zipped archives
- 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>
Use unzipped archives (recommended)
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
Requirements
- 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 && gem install bundler
- Grunt - how to install:
$ npm install -g grunt-cli
... (“Getting Started”)
Arrangements
- Clone this repository. (https://github.com/satorumurmur/bibi/)
$ cd <the repository>
$ bundle install --path=vendor/bundle
thenvendor/bundle
directory including RubyGems(Compass and dependent gems) will be installed.$ npm install
thennpm-modules
directory including modules will be installed.
Development
$ grunt
and start watching changes of files, and make these files:bib/i/res/scripts/bibi.js
... JSZip.js + base64.js + easing.js + sML.js + bibi.core.js + bibi.epubcfi.jsbib/i/res/styles/bibi.css
bib/i/res/styles/pipi.css
... (formerlybib/i.css
, for embedding BiB/i to webpage)
- Edit files.
- JavaScript sources of the
bib/i/res/scripts/bibi.js
are inbibi-dev/res/scripts/lib/
andbibi-dev/res/scripts/src/
. - SCSS sources of the
bib/i/res/styles/bibi.css
andbib/i/res/styles/pipi.css
are inbibi-dev/res/styles/src/
.
- JavaScript sources of the
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
BiB/i
- © Satoru MATSUSHIMA - http://bibi.epub.link/
- Licensed under the MIT license. - http://www.opensource.org/licenses/mit-license.php
BiB/i is including these softwares
- JSZip ... © Stuart Knightley (Dual licensed under the MIT license or GPLv3.)
- base64.js ... © dankogai (Licensed under the MIT license.)
- easing.js ... © Dan Rogers (Licensed under the MIT license.)
- sML ... © Satoru MATSUSHIMA (Licensed under the MIT license.)
- Font Awesome 4.0.3 ... © Dave Gandy (Licensed under SIL Open Font License.)
- Foundation Icons v 3.0 ... © ZURB (Licensed under the MIT license.)