A fork for use with mybinder
remix your Jupyter Notebooks as interactive slideshows
After installing (and potentially enabling) as appropriate for your environment, relaunch the Jupyter Notebook: in the main toolbar, you will get two new buttons that toggle the Authoring and Presenting modes.
When Authoring, you can click on the (?)
icon to see a number of in-Notebook guided tours that show all the features, as well as see links to community pages:
- mailing list for general or long-term discussion and announcements
- issues for technical issues, as well as feature requests
- chat for quickly connecting with other users
- live_reveal/RISE, the original inspiration for this work, based on reveal.js.
- RMarkdown presentations
When you are happy with your presentation, you can download the standalone HTML file from the File -> Download as -> Presentation (.html) menu item.
Note: installing directly off this repo won't work, as we don't ship the built JavaScript and CSS assets. See more about developing below.
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 --user
nbpresent.install
accepts all of the same arguments asjupyter nbextension install
.
conda install -c anaconda-nb-extensions nbpresent
This will enable nbpresent
by default.
Stock nbconvert
doesn't store quite enough information, so you'll need to do something like this:
nbpresent -i notebooks/README.ipynb -o README.html
The resulting file can be hosted and viewed (but not edited!) on any site.
If you have installed nbbrowserpdf, you can also export to pdf:
nbpresent -i notebooks/README.ipynb -f pdf -o README.pdf
You can also pass in and get back streams:
cmd_that_generates_ipynb | nbpresent -f pdf > README.pdf
Here's the whole doc:
!nbpresent --help
usage: nbpresent [-h] [-i IPYNB] [-o OUTFILE] [-f {html,pdf}]
Generate a static nbpresent presentation from a Jupyter Notebook
optional arguments:
-h, --help show this help message and exit
-i IPYNB, --ipynb IPYNB
Input file (otherwise read from stdin)
-o OUTFILE, --outfile OUTFILE
Output file (otherwise write to stdout)
-f {html,pdf}, --out-format {html,pdf}
Output format
This assumes you have cloned this repository locally:
git clone https://github.com/Anaconda-Platform/nbpresent.git
cd nbpresent
The nbpresent
nbextension is built from ./src
into ./nbpresent/static/nbresent
with:
less
for stylees6
(viababel
) for javascriptbrowserify
for packaging
The nbpresent
python module (server component) is stored in the /nbpresent
folder
You'll need conda installed, either from Anaconda or miniconda. You can import a Python 3.5 development environment named nbpresent
from ./environment.yml
.
conda update env
source activate nbpresent
We still use npm
for a lot of dependencies, so then run:
npm install
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
If developing in a conda environment, you would want to pass in --prefix
instead of --user
.
Task | Command |
---|---|
Build all of the front end assets with sourcemaps for development | npm run build |
Rebuild on every save | npm run watch |
Rebuild all of the front end assets, and optimize it | npm run dist |
Run the CasperJS and nose tests |
npm run test |
Check code style | npm run lint |
Build the conda package | npm run pkg:conda |
Build and upload the pypi test package | npm run pkg:pypi |
Build and upload the pypi release package | npm run pkg:pypi:release |
Build the ESDoc and Sphinx documentation | npm run docs |
- minor build changes
- Update to notebook 4.2
- Theme editor removed. Significant work required to stabilize to public release quality.
- Adding some themes extracted from reveal.js
- fixing enabling on windows with
nb_config_manager
0.1.3 - trimming down conda packages
- more reproducible builds
- fixing issue with slides without regions and some layouts crashing editor #58
- adding JS extensibility of themes (partial #44)
- Theme editor
- Much more consistent UI
- Mnay bug fixes and more testing