# pandoc

> A wrapper around the pandoc tool.

Latest version **0.2.0** (published 2012-02-18) · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2012-02-18 |
| First published | 2011-11-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.4.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 33 |
| Author | Sam Bisbee |
| Maintainers | sbisbee |

## Links

- npm: https://www.npmjs.com/package/pandoc
- Repository: https://github.com/sbisbee/node-pandoc
- npm.io page: https://npm.io/package/pandoc

## Recent versions

- 0.2.0 (latest) — 2012-02-18
- 0.1.0 — 2011-11-02

## README

# node-pandoc

Version 0.2.0

https://github.com/sbisbee/node-pandoc

A node module that wraps the [Pandoc tool](http://johnmacfarlane.net/pandoc/),
allowing you to covert between markup types in node.

## Compatability

node-pandoc is tested against Node v0.6.x and v0.7.x.

## Examples

At a very basic level this library allows you to convert one markup type into
one or many. Supported markup types depends on how you installed Pandoc.

### Convert markdown into HTML

```js
var pandoc = require('pandoc');

pandoc.convert('markdown', mdText, [ 'html' ], function(result, err) {
  console.log(result.html); //outputs html
  console.log(result.markdown); //outputs the original markdown
});
```

### Convert HTML into reStructredTest and plain text

```js
var pandoc = require('pandoc');

pandoc.convert('html', htmlText, [ 'rst', 'plain' ], function(result, err) {
  console.log(result.rst); //outputs the reStructured Text
  console.log(result.plain); //outputs the plain text
  console.log(result.html); //outputs the HTML text
});
```

### Deal with errors (err is the exit status code from pandoc)

```js
var pandoc = require('pandoc');

pandoc.convert('invalid', moreInvalid, [], function(result, err) {
  if(err) {
    console.log('pandoc exited with status code ' + err);
  }
  else {
    //do stuff
  }
});
```

## License

node-pandoc is released under the Apache License, version 2.0. See the file
named LICENSE for more information.

Copyright information is in the [NOTICE](NOTICE) file.

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