Have a long scroll that you need to paginate into a Superbook?
Meet h2s—an intelligent paginator that treats that darn scroll with some sulfur. 😉
Hydrogen Sulfide or
See the Superbook format to learn more. Better still, try reading a book of your interest on a tablet.
How does it work?:
h2s uses Puppeteer by Google under the hood. Since Puppeteer is enormous
h2s may act up a little when you’re installing it for the first time. Worry not, there is help out there or feel free to raise an issue on Github with us for help.
Once your installation is successful, there is a very small surface of an api that you need to remember. And the commands go like this:
$ h2s [options] [command]
Options: -V, --version output the version number -v, --version output the version number -h, --help output usage information
1. $ h2s objectify # Turn `sanitized.html` into an 'array like' JSON. 2. $ h2s pagify # Paginate with gadda-gadda line-tracking! 3. $ h2s bookify # Templatize markup with layout to form actual pages
With just these three commands you can convert any markdown-compatible markup into a Superbook compatible codex.
Commands and their meaning:
./interimfolder that is sibling to the
manuscriptfolder at the root of your Bookiza project.
$ h2s objectifyto pull up the contents into a set of key: value pairs.
$ h2s pagifyto paginate the key: value pairs according to a responsive template at
$ h2s bookifyto apply layout on paginated content and produce book. And voila, your Superbook is ready!
$ bookiza serverto load your book in development mode at
That’s it. Your scroll is now available like book, all paginated, formatted alongwith line-tracking!
Library by: Sonica Arora, CTO of Bubblin Superbooks.
P.S.: Tried reading a Superbook on your iPad Safari/Chrome? Do it.