##// END OF EJS Templates
make rst2ipynb.py executable
Paul Ivanov -
Show More
@@ -1,21 +1,22 b''
1 #!/usr/bin/env python
1 """
2 """
2 A minimal front end to the Docutils Publisher, producing an ipython notebook.
3 A minimal front end to the Docutils Publisher, producing an ipython notebook.
3 """
4 """
4
5
5 import docutils.readers.standalone
6 import docutils.readers.standalone
6 import docutils.parsers.rst
7 import docutils.parsers.rst
7 import docutils.core
8 import docutils.core
8 import docutils.io
9 import docutils.io
9 import rst2ipynblib
10 import rst2ipynblib
10 from docutils.core import publish_cmdline
11 from docutils.core import publish_cmdline
11
12
12 description = ('Generates an ipython notebooks from standalone '
13 description = ('Generates an ipython notebooks from standalone '
13 'reStructuredText sources. ' +
14 'reStructuredText sources. ' +
14 docutils.core.default_description)
15 docutils.core.default_description)
15
16
16 publish_cmdline(reader=docutils.readers.standalone.Reader(),
17 publish_cmdline(reader=docutils.readers.standalone.Reader(),
17 parser=docutils.parsers.rst.Parser(),
18 parser=docutils.parsers.rst.Parser(),
18 writer=rst2ipynblib.Writer(),
19 writer=rst2ipynblib.Writer(),
19 enable_exit_status=1,
20 enable_exit_status=1,
20 usage=docutils.core.default_usage,
21 usage=docutils.core.default_usage,
21 description=description)
22 description=description)
General Comments 0
You need to be logged in to leave comments. Login now