Automatically render jupyter notebooks to html, markdown or pdf on git commits. Works with Bitbucket, no plugins necessary.
To install, move the nbgitconvert
file to the root of your repo and run:
This does two things:
nbgitconvert.ini
file that tells nbgitconvert which output types should be generatedin the [output_types]
section there is a line for every supported output type and whether to convert to that output type. nbgitconvert
will convert all committed *.ipynb files to all output types specified in the nbgitconvert.ini
file.By default, only html is marked for output.
The output path can also be specified in the config. Include {output_type} in the path to save each output type to a different directory.
Update the config generated during the setup step as needed. Note that in the sample nbgitconver.ini
file in this repo all formats have been set to "yes". The rendered notebooks in the jupyter notebooks/rendered/
directory were created from this config.
After running the above setup steps, nbgitconvert will convert any committed *.ipynb files to the output formats specified in nbgitconvert.ini
, adding them to the renders/{output_type}
directories, and commiting those new/updated files.
Assume you've already run the setup steps and are using the default values from nbgitconvert.ini
(only converts to html). Here are two scenarios:
new_notebook.ipynb
$ git add new_notebook.ipynb
$ git commit -m "added a new notebook"
rendered/html/new_notebook.html
and git adds that new file before commiting.Since this notebook already existed, let's assume the html version of the notebook also already existed.
existing_notebook.ipynb
. Now your jupyter notebook is out of sync with the rendered html version of the notebook.$ git add existing_notebook.ipynb
$ git commit -m "updated existing notebook"
rendered/html/existing_notebook.html
and git adds that updated file before commiting.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4