pixiv2html
Converts markuped text of pixiv novel into HTML.
Install
npm install pixiv2html
Usage
const pixiv2html = ; ; //=> ['<h1>foo</h1>']; //=> ['<p>pixiv</p><br><p>is</p>', '<p>awesome</p>'] ; //=> ['<h4><bar></h4>']
API
This API exposes a single function such as pixiv2html = require('pixiv2html')
.
pixiv2html(text[, options])
text
: [string] Input text markuped with pixiv novel styleoptions
: [object]options.transforms
: [object] Hash of functions to customize the output of tag conversionoptions.transforms.chapter
: [function(title)]options.transforms.pixivimage
: [function(illustID, pageNumber)]options.transforms.jump
: [function(pageNumber)]
options.type
: [string] String to switch the output to'html'
or'xhtml'
. Defaults to'html'
.
- return: [string[]] Array of pages of converted HTML