Difference between revisions of "Epub.js"
From TSAS Library
JStallings (talk | contribs) |
JStallings (talk | contribs) |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 12: | Line 12: | ||
==Viewing Your ebooks== | ==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 <code>var Book = ePub("../'''reader/moby-dick.epub'''");</code>. Something like <code>var Book = ePub("../'''books/[your epub filename'''");</code> | |||
# Make sure server is running (see step 6, above) | |||
# Open browser to [http://localhost:8080/examples/trial.html http://localhost:8080/examples/trial.html] | |||
# Rejoice. | |||
==Annotations== | |||
===Hypothes.is=== | |||
To run hypothes.is annotations that are bundled with epub.js, add <code><script src="annotator.min.js"></script></code> to trial.html. | |||
===Annotator=== | |||
# Download recent full release .zip | |||
# Unzip to /epub.js/annotator | |||
# Copy <code><script src="../annotator/annotator-full.min.js"></script></code> to trial.html file above, just before <code></body></code> | |||
==See Also== | |||
http://annotatorjs.org/ | |||
[https://github.com/futurepress/epub.js/issues/98 Using it without node.js] | |||
http://annotateit.org/ | |||
==References== | ==References== | ||
<references /> | <references /> | ||
Latest revision as of 07:29, 14 November 2016
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/