Skip to content

A conversion utility for converting reStructuredText markup to markdown

License

Notifications You must be signed in to change notification settings

inherelab/rst2mdown

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

A conversion utility for converting reStructuredText markup to markdown

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.8%
  • Shell 0.2%