Skip to content

ijstokes/nbpresent

 
 

Repository files navigation

nbpresent

remix your Jupyter Notebooks as interactive slideshows

Installation

pip install nbpresent
python -m nbpresent.install

Then either run

%reload_ext nbpresent

_every time you start the notebook or enable the extension for every notebook launch:

python -m nbpresent.install --enable

Coming soon

Export

Stock nbconvert doesn't store quite enough information, so you'll need to do something like this:

python -m nbpresent.present notebooks/README.ipynb > README.html

The resulting file can be hosted and viewed (but not edited!) on any site with fallback to Github.

Development

There are several development scenarios

The Hard Way

The nbpresent nbextension is built from src in a checked out repo with:

  • less for style
  • babel for es2015
  • browserify for packaging

These are installed via npm:

npm install

To build everything with sourcemaps:

npm run build

To rebuild on every save:

npm run watch

To build everything, and optimize it:

npm run build

To ensure that you always get the right assets, install the nbextension with the symlink, force and enable options:

python -m nbpresent.install --overwrite --symlink --enable --user

Developing with conda

A conda package, which pre-builds the static assets and installs itself into the local conda environment, is built from conda.recipe

conda build conda.recipe

When developing with conda, you may want to use your conda environment to store assets and configuration:

python -m nbpresent.install --overwrite --symlink --enable --prefix="${CONDA_ENV_PATH}"

Developing with docker compose

A number of intermediate Dockerfiles are available for different development workflows. These are most easily managed with docker-compose.

For building a pristine conda environment, use conda_base. For a build of nbpresent, with all tests, use conda_build. For a live, running notebook with nbpresent installed, use conda.

META: TODO: make templates?

Here is the build chain:

docker-compose build conda_base && \
docker-compose build conda_build && \
docker-compose build conda && \
docker-compose up conda

About

next generation slides for Jupyter Notebooks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 79.2%
  • CSS 9.3%
  • Python 6.1%
  • Shell 3.1%
  • Smarty 2.1%
  • Batchfile 0.2%