# pixiv2html

> Converts markuped text of pixiv novel into HTML.

Latest version **2.0.0** (published 2017-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install pixiv2html
pnpm add pixiv2html
yarn add pixiv2html
bun add pixiv2html
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2017-09-05 |
| First published | 2016-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Koki Takahashi |
| Maintainers | hakatashi |
| Keywords | pixiv, novel, pixiv novel, markup, text, converter, HTML |

## Links

- npm: https://www.npmjs.com/package/pixiv2html
- Repository: https://github.com/hakatashi/pixiv2html
- Homepage: https://github.com/hakatashi/pixiv2html#readme
- Issues: https://github.com/hakatashi/pixiv2html/issues
- npm.io page: https://npm.io/package/pixiv2html

## Dependencies (2)

- [escape-html](https://npm.io/package/escape-html.md) ^1.0.3
- [pixiv-novel-parser](https://npm.io/package/pixiv-novel-parser.md) ^0.3.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2017-09-05
- 1.2.0 — 2016-06-28
- 1.1.0 — 2016-06-26
- 1.0.0 — 2016-06-26

## README

pixiv2html
==========

Converts markuped text of pixiv novel into HTML.

[![Build Status][travis-image]][travis-url]
[![Coverage Status][coveralls-image]][coveralls-url]
[![Greenkeeper badge](https://badges.greenkeeper.io/hakatashi/pixiv2html.svg)](https://greenkeeper.io/)

[travis-image]: https://travis-ci.org/hakatashi/pixiv2html.svg?branch=master
[travis-url]: https://travis-ci.org/hakatashi/pixiv2html
[coveralls-image]: https://coveralls.io/repos/github/hakatashi/pixiv2html/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/github/hakatashi/pixiv2html?branch=master

## Install

    npm install pixiv2html

## Usage

```js
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]
    * `options.transforms`: [object] Hash of functions to customize the output of tag conversion
        * `options.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

---
_Source: https://npm.io/package/pixiv2html · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
