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:
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
pip install nbpresent
jupyter nbextension install nbpresent --py --overwrite
jupyter nbextension enable nbpresent --py
jupyter serverextension enable nbpresent --py
conda
conda install -c conda-forge nbpresent
This will enable the nbpresent
nbextension
and serverextension
automatically!
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.
You can also pass in and get back streams:
cmd_that_generates_ipynb | nbpresent > README.html
If you have installed nbbrowserpdf, you can also export to pdf:
nbpresent -i notebooks/README.ipynb -f pdf -o README.pdf
Here's the whole doc:
In [1]:
!nbpresent --help
You'll need conda installed, either from Anaconda or miniconda. You can create a Python development environment named nbpresent
from ./environment.yml
.
conda create -n nbpresent python=YOUR_FAVORITE_PYTHON
conda update env
source activate nbpresent
We still use npm
for a lot of dependencies, so then run:
npm install
Finally, you are ready to build the assets!
npm run build
To ensure that you always get the right assets, install the nbextension with the symlink
options:
jupyter nbextension install nbpresent --overwrite --symlink --sys-prefix
jupyter nbextension enable nbpresent --sys-prefix
jupyter serverextension enable nbpresent --sys-prefix
See chore automation below for more good times.
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 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 |
conda
package building