Org To Jupyter Notebook

I've grown to really like org-mode, particularly with ob-ipython, but there are times when a real Jupyter notebook is better - if you want to render it on github or use the %matplotlib notebook feature, for instance. I found a blog post the Kitchin Research Group site announcing the creation of an exporter and this is some documentation about how to set it up.


When I originally set this up it was only available from a link on the blog-post, but it has since been added to a much larger github repository called scimax. I'm assuming this is where the latest version will be kept. Unfortunately there's no license so I don't think you can fork the repository, even more importantly, I can't get it to work, so skip it for now and grab the old one.

cd ~/.emacs.d
mkdir lisp


Make sure that the lisp folder is in the emacs path by putting this line in init.el.

(add-to-list 'load-path "~/.emacs.d/lisp")

Also make sure that it's loaded by putting this in init.el.

(require 'ox-ipynb)


In your org-mode file use the export-ipython function to export it to an ipynb file.

M-x export-ipynb-buffer

Note that this will only work if you have ob-ipython installed and at least one ipython code block in the org-file.

#+BEGIN_SRC ipython :session