Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swzzl-com/h2s
A pagination library to convert markdown-compatible HTML into a Superbook.
https://github.com/swzzl-com/h2s
Last synced: 3 days ago
JSON representation
A pagination library to convert markdown-compatible HTML into a Superbook.
- Host: GitHub
- URL: https://github.com/swzzl-com/h2s
- Owner: swzzl-com
- License: other
- Created: 2019-01-30T03:21:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T16:48:06.000Z (over 1 year ago)
- Last Synced: 2025-01-13T04:41:34.169Z (11 days ago)
- Language: JavaScript
- Homepage: https://bookiza.io
- Size: 9.37 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# DEPRECATED.
THIS LIBRARY MIGHT STILL WORK FOR CERTAIN USE CASES, BUT IT ISN'T UP TO THE LATEST STANDARD OR BEING ACTIVELY DEVELOPED OR BEING MAINTAINED/SUPPORTED ANYMORE.
- USE AT YOUR OWN RISK.
- PLEASE DO NOT SUBMIT PRs.---
# Hydrogen Sulfide
Typeset and paginate long-form content into intrinsically scaling pages of a Superbook.
`h2s` is a Command Line Utility.
## Installation
To install the CLI:
```nodejs
$ npm i -g h2s
```## Usage
```nodejs
$ h2s --help # Vocabulary$ h2s [options] [command]
/*
Options:
-V, --version output the version number
-v, --version output the version number
-h, --help output usage information
*/
```
## Functions1. $ h2s objectify|o # Turns `sanitized.html` into a serialized array-like json. (Output: `interim/tmp/.prebook`)
2. $ h2s pagify|p # Paginates using `gadda-gadda` typesetting, line-tracking, and minimal leading+orphan/widow handling. (Output: `interim/tmp/.book`)
3. $ h2s bookify|b # Templatize markup with layout and content to form the pages of the book.#### Steps and their meaning:
1. Place your `sanitized.html` at `./interim` folder (sibling to the `manuscript` folder at the root of your [Bookiza](https://bookiza.io) project).
2. Execute `$ h2s objectify` to pull up the contents into a set of key: value pairs.
3. Run `$ h2s pagify` to paginate the key: value pairs according to a responsive template at `./templates` folder.
5. Run `$ h2s bookify` to apply layout on paginated content and produce book. And voila, your Superbook is ready!
Run `$ bookiza server` to load your book on development server at `localhost:4567`.