notion-export-prettify
Export, convert, rest.
This tool enables you to take a standard page export from Notion, and turn it into a branded PDF.
Features:
- Takes as input a zip file generated by Notion's export HTML function
- Manipulates the HTML to:
- Clean up the content (and remove stuff you want to keep private)
- Number headings
- Apply custom CSS with your branding
- Rejig the table of contents
- Apply branded headers and footers to all pages, with your custom metadata (and page numbers)
- Embed that metadata in the PDF
- Insert a branded cover page
All of those are optional, and will just be done if associated resources are available in the template.
Templates
Templates? Yes, you can also have several templates defined, and choose the one to apply when you run the tool.
Programmatic Usage
The tool can be used as a Python module in addition to the CLI.
from bs_notion_export_prettify import prettify
output_path = prettify(
input_file="export.zip", # or "export.html"
output="my-document.pdf", # optional, defaults to title-based name next to input
template="example", # optional, name, dir, or path to a template.cfg
title="My Document", # optional metadata
subtitle="A subtitle",
description="Brief description",
project="My Project",
author="Jane Smith",
date="2026-04-04",
identifier="DOC-001",
cover_page=True, # default True
heading_numbers=True, # default True
strip_internal_info=True, # default True
table_of_contents=True, # default True
)
print(f"PDF saved to {output_path}")
The lower-level classes are also importable for custom pipelines:
from bs_notion_export_prettify import (
NotionHtmlManipulator,
HtmlTemplator,
PdfMaker,
ResourceLoader,
)
Documentation
For full documentation, head to this Notion page, which you can also use as a source for the tool itself, to test it.
Metadata
Release files for bs-notion-export-prettify 1.4.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bs_notion_export_prettify-1.4.5.tar.gz | 494.2 kB | Without provenance | Details for bs_notion_export_prettify-1.4.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bs_notion_export_prettify-1.4.5-py3-none-any.whl | Python 3 | none | any | Details for bs_notion_export_prettify-1.4.5-py3-none-any.whl |
Total release size: 520.4 kB
Release files / bs_notion_export_prettify-1.4.5.tar.gz
| Download URL | bs_notion_export_prettify-1.4.5.tar.gz |
|---|---|
| Size | 494.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5dda4627bc8b492effdeb03f7db69427582a14ac56329db6fe53284961619c18
|
|
BLAKE2b-256 checksum How to use checksums |
e435fc30830710a768107d30f733510cac921cfa3dd665e170d83ce2267dcc79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.14.0 Linux/6.6.87.2-microsoft-standard-WSL2
|
Release files / bs_notion_export_prettify-1.4.5-py3-none-any.whl
| Download URL | bs_notion_export_prettify-1.4.5-py3-none-any.whl |
|---|---|
| Size | 26.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
616628f745cd737e7fdf7df2cf86606787d75fcb99c6dbc1a17cf088b234f994
|
|
BLAKE2b-256 checksum How to use checksums |
71ead82f72aea8275768022822a975d16d1a9b0cf0b599a995726a52b933c37e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.14.0 Linux/6.6.87.2-microsoft-standard-WSL2
|
Security for bs-notion-export-prettify 1.4.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.