paja
v0.0.3
Published
Pandoc wrapped in JavaScript
Downloads
20
Readme
Paja is a simple JavaScript wrapper around pandoc, the great multi-format document converter. Paja is inspired by Paru, a Ruby wrapper for pandoc that I wrote earlier. Like Paru, Paja supports automating the use of pandoc. Paja is free software; Paja is licensed under the GNU General Public Licence version 3.
The current version of Paja is 0.0.3, which is an alpha version.
See Paja's webpage for more detailed documentation. Below follows a very brief excerpt of that documentation
Installation
Because Paja is a wrapper around pandoc, pandoc obviously is a requirement for Paja. Install Paja with npm:
npm install paja
Usage
The obligatory "hello world" program with paja:
const paja = require("paja");
const INPUT = `
> Hello World!
from **Paja**`;
const markdown2html = paja.Pandoc.converter().from("markdown").to("html");
markdown2html.run(INPUT, console.log);
which will output:
<blockquote>
<p>Hello World!</p>
</blockquote>
<p>from <strong>Paja</strong></p>
For more examples, see the documentation or the examples subdirectory.