Skip to content

Instantly share code, notes, and snippets.

@yoavram
Last active December 11, 2015 21:28
Show Gist options
  • Save yoavram/4662688 to your computer and use it in GitHub Desktop.
Save yoavram/4662688 to your computer and use it in GitHub Desktop.
A recipe for setting up IPython notebook nbconvert with reveal.js slideshows. .shfiles can also be used as .bat files, as long as you fix the \ / folder separator issue. The working directory will get a new nbconvert project. the ipython-notebooks is where you keep your notebooks. You will need git (I use version 1.8.0), python (I use 2.7.3), IP…
python ../nbconvert/nbconvert.py -f reveal reveal-test.ipynb
reveal-test_slides.html
git clone https://github.com/damianavila/nbconvert.git
cd nbconvert
git checkout reveal_converter
git submodule init
git submoudle update
cd ../ipython-notebooks
git submodule add https://github.com/hakimel/reveal.js.git
mkdir js
cp ../nbconvert/js/* js/.
mkdir notes
cp ../nbconvert/notes/* notes/.
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": "reveal-test"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"heading 1"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"source": [
"hi how are you"
]
},
{
"cell_type": "heading",
"level": 1,
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"heading 2"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print \"hello world\""
],
"language": "python",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"hello world\n"
]
}
],
"prompt_number": 1
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment