Skip to content
This repository was archived by the owner on Mar 26, 2018. It is now read-only.

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:// with http:// and download the book from that specific location.

Notes:

  1. 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 .hpub files by default, but the book:// protocol is agnostic so it could point also to a .epub version or .mobi version or even a pure textual .html version.

Usage in Baker

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:

  1. Manual updates of the current book.
  2. 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 (using book://local to go back to the "bookshelf" and download another one).
  3. The creation of chains of books, of downloadable references and so on.

This is the old repository of Baker Framework. It's not in use anymore. Please go to the active repository on BakerFramework.

Clone this wiki locally