Created
September 27, 2018 06:50
-
-
Save iamaziz/66af8c952c3cac52f5f446a37150f88c to your computer and use it in GitHub Desktop.
snippet: convert all Jupyter notebooks in current directory and its subdirectories "recursively"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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