2.0.0 • Published 7 years ago

pixiv2html v2.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

pixiv2html

Converts markuped text of pixiv novel into HTML.

Build Status Coverage Status Greenkeeper badge

Install

npm install pixiv2html

Usage

const pixiv2html = require('pixiv2html');

pixiv2html('[chapter: foo]'); //=> ['<h1>foo</h1>']
pixiv2html(`pixiv

is
[newpage]
awesome`); //=> ['<p>pixiv</p><br><p>is</p>', '<p>awesome</p>']

pixiv2html('[chapter: <bar>]', {
    transforms: {
        chapter: title => `<h4>${title}</h4>`
    },
}); //=> ['<h4>&lt;bar&gt;</h4>']

API

This API exposes a single function such as pixiv2html = require('pixiv2html').

pixiv2html(text[, options])

  • text: string Input text markuped with pixiv novel style
  • options: object
  • return: [string[]] Array of pages of converted HTML