Skip to content

Another wrapper for pandoc, including automatic binary download

License

Notifications You must be signed in to change notification settings

thorbenw/pandocjs

Repository files navigation

pandocjs

Another wrapper for pandoc, including automatic binary download.

js-semistandard-style vscode-cspell-style github-release-packager-issues github-release-packager-style github-release-packager-license github-release-packager-version

Installation

npm i pandocjs

Why?

Because I couldn't any npm package to wrap pandoc for use with JavaScript in node without requiring pandoc to be already installed locally. This package installs the required binaries in the background, independent in means of version and binaries from a locally pandoc installation.

Usage

To convert the contents of an existing file (docbook format) info to a file in markdown format, use the ConvertFileSync() method:

const pandoc = require('pandocjs');

pandoc.ConvertFileSync('document.xml', 'docbook', 'document.md', 'gfm', { atxHeaders: true, wrap: 'preserve' });

Development Support

There's plenty of JsDoc documentation included in this package (auto generated calling pandoc with the --help, --list-input-formats and --list-output-formats options). If your development environment provides assistance by reading this information, all methods can be used pretty straight forward (e.g. Visual Studio Code reads the JsDoc comments to include it in the Intellisense feature).

About

Another wrapper for pandoc, including automatic binary download

Resources

License

Stars

Watchers

Forks

Packages

No packages published