A framework for building print media with nbconvert.
Jupyter Notebooks are widely used for reports via nbconvert, but most development work has been on enabling building interactive websites. The goal of nbprint is to focus on print-oriented workflows, e.g. PDF, by leveraging new developments in nbconvert and the pagedjs print-oriented layout library.
For a deeper dive, see the documentation.
nbprint provides an nbconvert template and a configuration framework.
The simplest example can be run with defaults by calling the nbprint executable on an existing notebook:
nbprint examples/basic.ipynbThis CLI supports configuration-driven customization with hydra syntax:
nbprint examples/basic.ipynb +nbprint.name=test ++nbprint.outputs.target=pdf
# First cell is papermill-style parameters
nbprint examples/parameters.ipynb +nbprint.parameters.a=test
# Overlay a config group, e.g. title and table of contents
nbprint examples/basic.ipynb nbprint/content/frontmatter=nbprint/title_tocgraph TB
nb("notebook<br>(.ipynb)")
nbc{nbconvert}
nbct[/nbprint <br> template/]
pjs[/paged.js <br> layout engine/]
o@{ shape: doc, label: "output (html,pdf,etc)" }
nb e2@--->nbc
e2@{animate: true}
nbct --> nbc
pjs --- nbct
nbc e3@-->o
e3@{animate: true}
For more information, see the architecture documentation.
See the configuration framework documentation for more information on building pure YAML-based report workflows with hydra.
Install with pip:
pip install nbprintInstall with conda
conda install nbprint -c conda-forgeWarning: This project is under active development, so all APIs are subject to change!
This software is licensed under the Apache 2.0 license. See the LICENSE file for details.
Note
This library was generated using copier from the Base Python Project Template repository.