```{toctree}
---
caption: ""
maxdepth: 2
hidden: true
---
docs/src/background.md
docs/src/architecture.md
docs/src/configuration.md
docs/src/api.md
```
A framework for building print media with [`nbconvert`](https://nbconvert.readthedocs.io).
[](https://github.com/nbprint/nbprint/actions/workflows/build.yaml)
[](https://app.codecov.io/gh/nbprint/nbprint/tree/main)
[](https://github.com/nbprint/nbprint/issues)
[](https://github.com/nbprint/nbprint)
## Background
Jupyter Notebooks are widely used for reports via [`nbconvert`](https://nbconvert.readthedocs.io/en/latest/), 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`](https://pagedjs.org) print-oriented layout library.
For a deeper dive, see [the documentation](https://nbprint.github.io/nbprint/index.html).
## Quickstart
`nbprint` provides an `nbconvert` template and a [configuration framework](https://nbprint.github.io/nbprint/docs/src/configuration.html).
The simplest example can be run with defaults by calling the `nbprint` executable on an existing notebook:
```bash
nbprint examples/basic.ipynb
```
This CLI supports configuration-driven customization with [hydra](https://hydra.cc) syntax:
```bash
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_toc
```
```mermaid
graph TB
nb("notebook
(.ipynb)")
nbc{nbconvert}
nbct[/nbprint
template/]
pjs[/paged.js
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](https://nbprint.github.io/nbprint/docs/src/architecture.html).
### Configuration
See the [configuration framework documentation](https://nbprint.github.io/nbprint/docs/src/configuration.html) for more information on building pure YAML-based report workflows with `hydra`.
## Installation
Install with `pip`:
```bash
pip install nbprint
```
Install with `conda`
```bash
conda install nbprint -c conda-forge
```
## Development
**Warning**: This project is under active development, so all APIs are subject to change!
## License
This software is licensed under the Apache 2.0 license. See the [LICENSE](LICENSE) file for details.
> [!NOTE]
> This library was generated using [copier](https://copier.readthedocs.io/en/stable/) from the [Base Python Project Template repository](https://github.com/python-project-templates/base).