Static HTML export via nbconvert

Clone nbconvert if we don't have it already

In [1]:
import os
if os.path.exists('nbconvert'):
    print "already have nbconvert"
else:
    print "cloning nbconvert..."
    !git clone --quiet git://github.com/ipython/nbconvert
already have nbconvert

And do a simple plot, to show that figures work:

In [2]:
%pylab inline
Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].
For more information, type 'help(pylab)'.
In [3]:
x = linspace(-1,1)
plot(sin(10*x),x)
plot(x,sin(10*x))
Out[3]:
[<matplotlib.lines.Line2D at 0x104a81650>]

Trigger save via Javascript (this is totally unnecessary, but useful for 'run all')

In [4]:
from IPython.display import display, Javascript
display(Javascript("IPython.notebook.save_notebook()"))

And run nbconvert to generate the HTML notebook

In [5]:
!python nbconvert/nbconvert.py -f html "staticHTML.ipynb"

And here is a link to the static HTML render of this notebook

In [5]: