File: rst2md

package info (click to toggle)
nb2plots 0.7.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,160 kB
  • sloc: python: 5,223; makefile: 225
file content (28 lines) | stat: -rwxr-xr-x 560 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!python
"""
rst2md
======

A command line interface that uses the Markdown writer to output from
ReStructuredText source.
"""

import locale
try:
    locale.setlocale(locale.LC_ALL, '')
except:
    pass

from docutils.core import publish_cmdline, default_description

from nb2plots.doctree2md import Writer

description = ('Generates Markdown formatted text from standalone '
               'reStructuredText sources.  ' + default_description)

def main():
    publish_cmdline(writer=Writer(), description=description)


if __name__ == '__main__':
    main()