Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert ReStructuredText docs to ipython notebooks?

A lot of documentation in the python community these days is written in ReStructuredText. I want to convert some of these docs to ipython notebooks so that it is possible to not just read the examples in the docs, but interact with them immediately.

How can I convert ReStructuredTexts to ipython notebooks? Is there any way to do this? Maybe using pandoc as an intermediate step?

I have already read some docs on how to convert ipython notebooks to other formates, but I am interested in doing it the other way around, from rst to iptyhon. Any ideas?

like image 390
Private Avatar asked Apr 01 '14 09:04

Private


People also ask

How do I make an IPython notebook?

You can create new notebooks from the dashboard with the New Notebook button, or open existing ones by clicking on their name. You can also drag and drop . ipynb notebooks and standard . py Python source code files into the notebook list area.

How do I convert a Python File to a Jupyter Notebook?

Use p2j to convert Python source code to Jupyter Notebook. From the command line, run -->pip install p2j then go to the directory where your file is located. -->( for example-> cd downloads, if the file is in download directory) then run -->p2j myscript.py This will create a myscript. ipynb file.

What is the difference between Jupyter Notebook and IPython notebook?

The IPython Notebook is now known as the Jupyter Notebook. It is an interactive computational environment, in which you can combine code execution, rich text, mathematics, plots and rich media. For more details on the Jupyter Notebook, please see the Jupyter website.


1 Answers

If you are still looking for a solution, we are building a Sphinx extension to convert a collection of RST files to Jupyter notebooks.

sphinxcontrib-jupyter

like image 102
sanguineturtle Avatar answered Sep 20 '22 18:09

sanguineturtle