Skip to content

Instantly share code, notes, and snippets.

@HacksonClark
Created February 27, 2023 20:13
Show Gist options
  • Save HacksonClark/3fb24c59c5be8682096e89fe97237443 to your computer and use it in GitHub Desktop.
Save HacksonClark/3fb24c59c5be8682096e89fe97237443 to your computer and use it in GitHub Desktop.
Converts all jupyter notebook (ipynb) files in current directory to html files.
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