This repository has been archived by the owner on Mar 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 378
hpub specification
folletto edited this page Oct 3, 2011
·
24 revisions
The HPub (HTML Publication) standard is a file format designed to release rich content books in a simple and manageable package.
We want a digital publishing format that:
- Allows great designs
- Allows both pixel-perfect and flexible reflowable publications
- Is simple for authors
- Is simple for parsers
- An HPub publication is a normal .zip file with ".hpub" extension. You can have a non-zipped HPub.
- The content format must be HTML5.
- It must contain a file "book.json", lowercase, following the HPub specifications below.
- All the assets (CSS, images, JS, ...) should be included in the package and referenced relatively from the HTML5 files.
The file book.json must be a properly formatted JSON file.
An example of the minimal form:
{
"title": "The Study in Scarlet",
"author": ["Arthur Conan Doyle"],
"url": "book://bakerframework.com/books/arthurconandoyle-thestudyinscarlet",
"contents": [
"Article-Lorem.html",
"Article-Ipsum.html",
"Article-Gaium.html",
"Article-Sit.html",
"Article-Amet.html"
]
}
An example of the full form:
{
"hpub": 1,
"title": "The Study in Scarlet",
"author": ["Arthur Conan Doyle"],
"creator": ["D. Casali", "M. Colombo", "A. Morandi", "F. Fortes"],
"date: "2011-08-23",
"url": "book://bakerframework.com/books/arthurconandoyle-thestudyinscarlet",
"orientation": "both",
"zoomable": false,
"-baker-background": "#000000",
"-baker-vertical-bounce": true,
"-baker-index-bounce": true,
"-baker-index-height": 150,
"-baker-media-autoplay": true,
"-treesaver-loopArticles": "true",
"contents": [
"Book Cover.html",
"Book Index.html",
{
"url": "Front-Article.html",
"title": "The Wonders of Hpub",
"author": "The community"
},
"Part1-01.html",
"Part1-02.html",
"Part1-03.html",
"Part1-04.html",
"Part1-05.html",
"Part1-06.html",
"Part1-07.html",
"Part2-01.html",
"Part2-02.html",
"Part2-03.html",
"Part2-04.html",
"Part2-05.html",
"Part2-06.html",
"Part2-07.html",
"Colophon.html"
]
}
Required parameters:
author (string|array): Author of the publication. Use an array when more than one author is required, in the defined order.
content (array): List of all the pages contained in the publication, in the correct visualization order. Each item should be either a string containing the filename or an hash
Optional parameters:
Extensions: