Epub.js
From TSAS Library
Local Installation
- Install Git
- Install Node.js
- Clone latest branch from here with
git clone [url]
- (For 0.3) Install the project dependencies with npm
npm install
[1] - Install bower
bower install
- Run server with
./tools/server
- Navigate to http://localhost:8080/tests and lament the errors.
- Navigate to http://localhost:8080 and celebrate the successful test.
Viewing Your ebooks
- Copy source code from an example html file at epub.js\examples. Contained.html is recommended if using standard (zipped) epub files. Save as trial.html in epub.js\examples
- Place .epub file in /books
- Open .html in editor, copy epub path to
var Book = ePub("../reader/moby-dick.epub");
. Something likevar Book = ePub("../books/[your epub filename");
- Make sure server is running (see step 6, above)
- Open browser to http://localhost:8080/examples/trial.html
- Rejoice.
Annotations
Hypothes.is
To run hypothes.is annotations that are bundled with epub.js, add <script src="annotator.min.js"></script>
to trial.html.
Annotator
- Download recent full release .zip
- Unzip to /epub.js/annotator
- Copy
<script src="../annotator/annotator-full.min.js"></script>
to trial.html file above, just before</body>
See Also
http://annotatorjs.org/ Using it without node.js http://annotateit.org/