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

Book protocol

folletto edited this page Oct 11, 2011 · 12 revisions

The book:// protocol syntax:

book://example.org/whatever/whenever/publication.hpub/filename.html#anchor

Two great advantages:

  • We are able to uniquely identify a book: the path is unique, identifies 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 identified, we can also refer to items from its content: filename (i.e. "filename.html") and anchor (i.e. "#anchor").
  • We are able to download a book: the protocol used is the standard HTTP, so you can easily convert book:// in 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 will recognize book:// links from the currently opened book page, and will automatically download and opens the current book with the downloaded one.

There's one extra URL recognized by Baker: book://local that will go back from a downloaded book to the default book 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 "shelf book" that downloads the book you want (using book://local to go back to the "shelf book" and download another one).
  3. The creation of chains of books, of downloadable references and so on.