Created
February 27, 2023 20:13
-
-
Save HacksonClark/3fb24c59c5be8682096e89fe97237443 to your computer and use it in GitHub Desktop.
Converts all jupyter notebook (ipynb) files in current directory to html files.
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
import os | |
from os import listdir | |
from os.path import isfile, join | |
onlyfiles = [f for f in listdir('.') if isfile(join('.', f))] | |
for file in onlyfiles: | |
if file.split('.')[-1] == 'ipynb': | |
print(file) | |
os.system(f'jupyter nbconvert --to html {file}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment