Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A conversion utility for converting reStructuredText markup to markdown
branch: master

This branch is even with kitsonk:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
lib
man
test
.jshintrc
CONTRIBUTING.md
LICENSE
README.md
index.js
package.json

README.md

rst2mdown

This is a utility for converting from reStructuredText mark-up to markdown mark-up.

Installation

The tool can be installed via npm:

$ npm install rst2mdown

Or you can download the .zip or .tar.gz, extract and use.

Testing

You can test the installation be using the test script from the root directory:

$ node test

Usage

You will require NodeJS installed. To take in a reStructuredText file and output a markdown one, you would run the following command from the root of the install:

$ bin/rst2mdown -i somefile.rst -o somefile.md

Also, the binary version also support stdin and stdout:

$ bin/rst2mdown < somefile.rst > somefile.md

And module supports both CommonJS and AMD loading. To load as CommonJS module under node:

var rst2mdown = require('rst2mdown');

var mdown = rst2mdown(someReStructuredText);

Or as an AMD module:

require(['rst2mdown'], function (rst2mdown) {
    var mdown = rst2mdown(someReStructuredText);
});

Converting from reStructuredText to markdown is not straight forward. Generally speaking, reStructuredText provides significantly more features than are supportable via markdown. Please refer to the Conversion Notes to understand how particular aspects of the conversion are handled.

License

This code is licensed under the New BSD License and is Copyright (c) 2012 Kitson P. Kelly.

Acknowledgement

This code is possible through documentation and concepts from other projects:

Something went wrong with that request. Please try again.