htmlbook.js
Parses HTML into HTMLBook.
Setup
Browser
Add the htmlbook.js script to a page with jQuery (tested with jQuery 1.10.2) and Marked.
Node.js
Install with npm: npm install -g htmlbook
Usage
Browser & Node.js
For both the browser and Node.js, usage is the same
var input = "HTML TEXT OR JQUERY OBJECT"
var output = HTMLBook(input).parse(opts);
Command Line
Installing this package with npm and the -g
flag will install an executable.
$ htmlbook -s SOURCE_FILE -o OUTPUT_FILE
Additionally, type $ htmlbook --help
for all options.
Opts
Below is a list of available options, default value is emphasized.
- sourceFormat: html or markdown
- fragment: false or true
- level: chapter or book
- debug: boolean -- default for command line is 'false'