mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-05 15:32:55 +02:00
Merge branch 'master' of github.com:fchasen/epub.js
This commit is contained in:
commit
25058ccf84
1 changed files with 17 additions and 9 deletions
26
README.md
26
README.md
|
@ -3,11 +3,11 @@ Epub.js
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Epub.js is a javascript library for rendering ePub's in the browser, across many devices.
|
Epub.js is a JavaScript library for rendering ePub documents in the browser, across many devices.
|
||||||
|
|
||||||
Epub.js provides common ebook functions (such as persistence and pagination) without the need to develop a dedicated application or plugin.
|
Epub.js provides common ebook functions (such as persistence and pagination) without the need to develop a dedicated application or plugin.
|
||||||
|
|
||||||
Unlike an application, our HTML / Javascript reader can be hosted anywhere and can be easily customized using javascript, such as changing the interface or adding annotation functionality.
|
Unlike an application, our HTML/JavaScript reader can be hosted anywhere and can be easily customized using JavaScript, such as changing the interface or adding annotation functionality.
|
||||||
|
|
||||||
[Try it while reading Moby Dick](http://fchasen.github.com/epub.js/demo/)
|
[Try it while reading Moby Dick](http://fchasen.github.com/epub.js/demo/)
|
||||||
|
|
||||||
|
@ -17,11 +17,11 @@ Why EPUB
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
ePUB is a widely used and easily convertible format. Many books are currently in this format and it is used as the base for many proprietary formats (such as Mobi and iBooks). We have chosen the ePUB standard because it brings us as close as possible to our “Books on the Web” vision, while enforcing a standard which enables the development of more advanced reader functionality.
|
ePUB is a widely used and easily convertible format. Many books are currently in this format, and it is used as the base for many proprietary formats (such as Mobi and iBooks). We have chosen the ePUB standard because it brings us as close as possible to our “Books on the Web” vision, while enforcing a standard which enables the development of more advanced reader functionality.
|
||||||
|
|
||||||
An unzipped ePUB3 is a collection of HTML5 files, CSS, images and other media – just like any other website. However, it enforces a schema of book components, which allows us to render a book and its parts based on a controlled vocabulary.
|
An unzipped ePUB3 is a collection of HTML5 files, CSS, images and other media – just like any other website. However, it enforces a schema of book components, which allows us to render a book and its parts based on a controlled vocabulary.
|
||||||
|
|
||||||
More specifically, the ePUB schema standardizes the table of contents, provides a manifest that enables the caching of the entire book and separates the storage of the content from how it’s displayed.
|
More specifically, the ePUB schema standardizes the table of contents, provides a manifest that enables the caching of the entire book, and separates the storage of the content from how it’s displayed.
|
||||||
|
|
||||||
Getting Started
|
Getting Started
|
||||||
-------------------------
|
-------------------------
|
||||||
|
@ -32,7 +32,7 @@ Get the minified code from the build folder:
|
||||||
<script src="../build/epub.min.js"></script>
|
<script src="../build/epub.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
If you plan on using compressed (zipped) epubs (any .epub file) include the minfied version of [zip.js](http://gildas-lormeau.github.io/zip.js/)
|
If you plan on using compressed (zipped) epubs (any .epub file) include the minified version of [zip.js](http://gildas-lormeau.github.io/zip.js/)
|
||||||
|
|
||||||
Also make sure to set ```EPUBJS.filePath``` to the directory containing ```inflate.js```
|
Also make sure to set ```EPUBJS.filePath``` to the directory containing ```inflate.js```
|
||||||
|
|
||||||
|
@ -70,6 +70,10 @@ However, the [Examples](https://github.com/fchasen/epub.js/tree/master/examples)
|
||||||
Recent Updates
|
Recent Updates
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
+ Started [Developer Mailing List](https://groups.google.com/forum/#!forum/epubjs)
|
||||||
|
|
||||||
|
+ Openned our public IRC, Server: freenode.net Channel: #epub.js
|
||||||
|
|
||||||
+ Started [Documentation](https://github.com/fchasen/epub.js/blob/master/documentation/README.md)
|
+ Started [Documentation](https://github.com/fchasen/epub.js/blob/master/documentation/README.md)
|
||||||
|
|
||||||
+ ePub("book.epub", options) returns a new EPUBJS.Book(options),
|
+ ePub("book.epub", options) returns a new EPUBJS.Book(options),
|
||||||
|
@ -114,11 +118,11 @@ grunt
|
||||||
Persistence / Offline Storage
|
Persistence / Offline Storage
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
The eBook reader uses persistence to cache the files from an epub for offline viewing, stores information about the book, and remembers what chapter the user was on. Being able to read a book when internet isn’t available, and remembering your place in the book is crucial to making our reader website work as an application and fulfill users expectations of how a eBook should function.
|
The eBook reader uses persistence to cache the files from an epub for offline viewing, stores information about the book, and remembers what chapter the user was on. Being able to read a book when Internet isn’t available, and remembering your place in the book is crucial to making our reader website work as an application and fulfill users expectations of how a eBook should function.
|
||||||
|
|
||||||
Currently, there is not a great cross browser solution for dynamic file storage. Chrome supports the Filesystem API, Firefox/IE support indexedDB, and Safari/Safari Mobile support Web SQL.
|
Currently, there is not a great cross browser solution for dynamic file storage. Chrome supports the [File System API](http://www.w3.org/TR/file-system-api/), Firefox/IE support [IndexedDB](http://www.w3.org/TR/IndexedDB/), and Safari/Safari Mobile support [Web SQL](http://www.w3.org/TR/webdatabase/).
|
||||||
|
|
||||||
The reader detects the storage capabilities of the browser and picks the best available option. When internet is available, the entire book is loaded into storage. When possible, Web Workers is used to handle loading and saving the files, so as not to interfere with the reading experience.
|
The reader detects the storage capabilities of the browser and picks the best available option. When Internet is available, the entire book is loaded into storage. When possible, [Web Workers](http://www.w3.org/TR/workers/) is used to handle loading and saving the files, so as not to interfere with the reading experience.
|
||||||
|
|
||||||
The browser tells the reader when there is Internet connectivity, and by listening to those events, it automatically switches to using the stored files. Users can also manually switch to offline mode in the interface.
|
The browser tells the reader when there is Internet connectivity, and by listening to those events, it automatically switches to using the stored files. Users can also manually switch to offline mode in the interface.
|
||||||
|
|
||||||
|
@ -127,7 +131,7 @@ Hooks
|
||||||
|
|
||||||
Similar to a plugins, Epub.js implements events that can be "hooked" into. Thus you can interact with and manipulate the contents of the book.
|
Similar to a plugins, Epub.js implements events that can be "hooked" into. Thus you can interact with and manipulate the contents of the book.
|
||||||
|
|
||||||
Examples of this functionality is loading videos from youtube links before displaying a chapters contents or implementing annotation.
|
Examples of this functionality is loading videos from YouTube links before displaying a chapters contents or implementing annotation.
|
||||||
|
|
||||||
Hooks require a event to latch onto and a callback for when they are finished.
|
Hooks require a event to latch onto and a callback for when they are finished.
|
||||||
|
|
||||||
|
@ -151,6 +155,10 @@ EPBUJS.Hooks.register("beforeChapterDisplay").example = function(callback, rende
|
||||||
Additional Resources
|
Additional Resources
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
[Epub.js Developer Mailing List](https://groups.google.com/forum/#!forum/epubjs)
|
||||||
|
|
||||||
|
IRC Server: freenode.net Channel: #epub.js
|
||||||
|
|
||||||
Follow us on twitter: @Epubjs
|
Follow us on twitter: @Epubjs
|
||||||
|
|
||||||
+ http://twitter.com/#!/Epubjs
|
+ http://twitter.com/#!/Epubjs
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue