This may be the conversion of a single HTML file (possibly pre-processed through ReSpec) or a collection of several HTML files. The usage of the entry point is:
Usage: r2epub [options] [url]
Convert the file or collection configuration at [url] to EPUB 3.2
Options:
-V, --version output the version number
-o, --output <fname> output file name.
If missing, the short name of the document is used
-r, --respec the source must be pre-processed by ReSpec
(default: false)
-s, --specStatus <type> specification type
-d, --publishDate <date> publication date
-l, --addSectionLinks add section links with "§".
-m, --maxTocLevel <number> maximum TOC level
-p, --package [debug option] do not generate an EPUB file,
just print the package file content.
(default: false)
-t, --trace [debug option] print built in trace information while
processing. (default: false)
-h, --help display help for command
For the -d, -s, -l, or -m flags, see the ReSpec manual. If any of those flags is set, -r is implied (i.e., it is not necessary to set it explicitly).
This function is a wrapper around the convert function.
Convert the HTML file (as generated by ReSpec) to an EPUB 3.2 file. The generated publication's name is short-name.epub, where short-name is set in the ReSpec configuration:
node r2epub.js https://www.example.org/doc.html
Convert the HTML ReSpec source to an EPUB 3.2 file. The source is converted on-the-fly by respec:
Convert the HTML ReSpec source to an EPUB 3.2 file, setting its spec status to REC. The source is converted on-the-fly by respec, overwriting the specStatus entry in the configuration to REC:
CLI for the ReSpec to EPUB 3.3 conversion.
This may be the conversion of a single HTML file (possibly pre-processed through ReSpec) or a collection of several HTML files. The usage of the entry point is:
For the
-d
,-s
,-l
, or-m
flags, see the ReSpec manual. If any of those flags is set,-r
is implied (i.e., it is not necessary to set it explicitly).This function is a wrapper around the convert function.
Usage examples:
Convert the HTML file (as generated by ReSpec) to an EPUB 3.2 file. The generated publication's name is
short-name.epub
, whereshort-name
is set in the ReSpec configuration:Convert the HTML ReSpec source to an EPUB 3.2 file. The source is converted on-the-fly by respec:
Convert the HTML ReSpec source to an EPUB 3.2 file, setting its spec status to REC. The source is converted on-the-fly by respec, overwriting the
specStatus
entry in the configuration toREC
:Convert the documents listed in the JSON configuration file to generate a collection of several documents:
where the collection may be something like:
{ "title": "Specification for Underwater Basket Weaving", "name": "weaving", "chapters": [ { "url": "https://www.example.org/first.html" }, { "url": "https://www.example.org/second.html", "respec": false, "config": {} }, { "url": "https://www.example.org/third.html", "respec": true, "config": { "maxTocLevel" : 3 } } ] }
See also some example collection configurations files.