Skip to content

Instantly share code, notes, and snippets.

@ilkayisik
Last active October 2, 2019 14:02
Show Gist options
  • Save ilkayisik/df0405ddf42ab682558dfe0431771eaa to your computer and use it in GitHub Desktop.
Save ilkayisik/df0405ddf42ab682558dfe0431771eaa to your computer and use it in GitHub Desktop.
# to be used to save jupyter notebooks as html files
import os
from ilkay_tools.jupyter_save import save_nb, output_html
import time
%%javascript
IPython.notebook.kernel.execute(`notebookName = '${IPython.notebook.notebook_name}'`);
nb_fdir = os.getcwd()
nb_name = notebookName.split('.', 1)[0] # discard the extension
nb_path = nb_fdir + '/' + notebookName
html_fdir = '/Users/ilkay.isik/MPI-Documents/fcContent/html_notebooks/define_rois_networks'
html_path = html_fpath + '/' + nb_name + '.html'
save_nb()
time.sleep(3)
output_html(nb_path, html_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment