Last active
June 16, 2018 13:32
-
-
Save pezcode/5a91ad0ba18d8ed6d69ec9424f4b98d6 to your computer and use it in GitHub Desktop.
Export IPython Notebook to presentation slides (this is handy to do from within the notebook)
This file contains 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 nbconvert import SlidesExporter | |
from traitlets.config import Config | |
infile = "Notebook.ipynb" | |
outfile = "Presentation.html" | |
config = Config({ | |
'SlidesExporter': { | |
'reveal_theme': 'serif', | |
'reveal_transition':'fade' | |
} | |
}) | |
body, _ = SlidesExporter(config=config).from_filename(infile) | |
with open(outfile, "wb") as fp: | |
fp.write(body.encode('utf-8')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment