Difference between revisions of "Epub.js"
From TSAS Library
JStallings (talk | contribs) |
JStallings (talk | contribs) |
||
| Line 14: | Line 14: | ||
# 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 | # 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 | # 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'''"); | # 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) | # Make sure server is running (see step 6, above) | ||
# Open browser to [http://localhost:8080/examples/trial.html http://localhost:8080/examples/trial.html] | # Open browser to [http://localhost:8080/examples/trial.html http://localhost:8080/examples/trial.html] | ||
Revision as of 11:39, 13 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.