This repository was archived by the owner on Mar 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 371
Book protocol
Simbul edited this page Oct 16, 2011
·
12 revisions
The HPub specification defines a book:// protocol to identify books. Here is an example of the syntax for a book URL:
book://example.org/whatever/whenever/publication.hpub/filename.html#anchor
Two great advantages:
- We are able to uniquely identify a book: being a URL the path is unique and it can be used to identify:
- a uniquely owned domain (i.e.
example.org) - a specific path (i.e.
whatever/whenever) - a specific publication (i.e.
publication) - format (i.e.
hpub) - Once we have identified a book, we can add further elements to the URL, to refer to specific items inside it:
- filename (i.e.
filename.html) - anchor (i.e.
#anchor) - We are able to download a book: the protocol used is the standard HTTP, so you can easily replace
book://withhttp://and download the book from that specific location.
Notes:
- The specific extension can be omitted: in that scenario, the reading software might try to download the extension that is best suited. Baker will download
.hpubfiles by default, but thebook://protocol is agnostic so it could point also to a.epubversion or.mobiversion or even a pure textual.htmlversion.
Baker understands book:// links inside books. When the user clicks on such a link, Baker will automatically download and open the book the link points to, replacing the current book with it.
Baker supports a special URL: when clicked, a link pointing to book://local will go back from a downloaded book to the default book originally contained in the published Baker app.
This will allow:
- Manual updates of the current book.
- The creation of a lightweight version or some kind of "bookshelf" to download books: the default book in the app will just be a collection of
book://links, allowing the users to download the book they want (usingbook://localto go back to the "bookshelf" and download another one). - The creation of chains of books, of downloadable references and so on.