https://github.com/nbprint/nbprint
A framework for building print-oriented media with Jupyter
https://github.com/nbprint/nbprint
html jupyter jupyter-notebook nbconvert pagedjs pdf print-media reporting reports
Last synced: 4 months ago
JSON representation
A framework for building print-oriented media with Jupyter
- Host: GitHub
- URL: https://github.com/nbprint/nbprint
- Owner: nbprint
- License: apache-2.0
- Created: 2019-09-05T03:27:06.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2025-04-13T05:21:05.000Z (about 1 year ago)
- Last Synced: 2025-04-13T12:13:33.611Z (about 1 year ago)
- Topics: html, jupyter, jupyter-notebook, nbconvert, pagedjs, pdf, print-media, reporting, reports
- Language: CSS
- Homepage:
- Size: 19.4 MB
- Stars: 33
- Watchers: 3
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
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).

