Skip to content

Instantly share code, notes, and snippets.

@iamaziz
Created September 27, 2018 06:50
Show Gist options
  • Save iamaziz/66af8c952c3cac52f5f446a37150f88c to your computer and use it in GitHub Desktop.
Save iamaziz/66af8c952c3cac52f5f446a37150f88c to your computer and use it in GitHub Desktop.
snippet: convert all Jupyter notebooks in current directory and its subdirectories "recursively"
from subprocess import check_output
from glob import glob
notebooks = glob('./**/*.ipynb', recursive=True)
for n in notebooks:
cmd = f'jupyter nbconvert --to html {n}'
check_output(cmd.split())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment