nbconv script to convert all ipynb in a folder into html


In [ ]:
from ipython import nbconv

In [ ]:
cd brobeur-web/

In [ ]:
import os

In [ ]:
dadir = '/home/wcmckee/artcontrol-api'

In [ ]:
opnb = os.listdir('/home/wcmckee/artcontrol-api')

In [ ]:
strliz = []

In [ ]:
if '.ipynb' in opz:
    strliz.append(opz)

In [ ]:
for opz in opnb:
    print opz
    if '.ipynb' in opz:
        strliz.append(opz)

In [ ]:
strliz

In [ ]:
nbfol = '/home/wcmckee/brobeur-web/notebook'

In [ ]:
os.chdir(dadir)
strliz

In [ ]:
for bnz in strliz:
    print bnz

In [ ]:
%%bash 
#ipython nbconvert notebook.ipynb
ipython nbconvert --to=latex --template=latex_book --post=pdf pyssh.ipynb

In [ ]:
import envoy
import subprocess

In [ ]:
import IPython.nbconvert

In [ ]:
from IPython.config import Config
from IPython.nbconvert import HTMLExporter,RSTExporter

In [ ]:
os.chdir('/home/wcmckee/brobeur-web/')

In [ ]:
exrst = RSTExporter.from_notebook_node

In [ ]:
for itz in ipy:
    lsr = envoy.run('ipython nbconvert pywgit.ipynb')

In [ ]:
lsr.std_out

In [ ]:
os.chdir(dadir)

In [ ]:
xc = subprocess.check_output('ipython nbconvert')

In [ ]:
xc

In [ ]:
cb = run('ls')

In [ ]:
cb.