Skip to content

Instantly share code, notes, and snippets.

@bbengfort
Created June 1, 2018 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbengfort/fb840e5e9a44715c4da50ad9af29606a to your computer and use it in GitHub Desktop.
Save bbengfort/fb840e5e9a44715c4da50ad9af29606a to your computer and use it in GitHub Desktop.
Run a Jupyter notebook as a slideshow.
#!/bin/bash
# Execute the reveal.js slides form of a Notebook
# Make sure the first argument to this script is a notebook
if [ "$#" -ne 1 ]; then
echo "Usage: ./slideshow.sh Notebook.ipynb"
exit 1
fi
# Make sure the notebook exists
if [ ! -f "$1" ]; then
echo "Please specify an existing notebook"
exit 1
fi
# Execute the jupyter slides convert and serving
jupyter nbconvert "$1" --output-dir=slides --to slides --post serve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment