Skip to main content

No project description provided

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bs_notion_export_prettify-1.4.1.tar.gz (493.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bs_notion_export_prettify-1.4.1-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file bs_notion_export_prettify-1.4.1.tar.gz.

File metadata

  • Download URL: bs_notion_export_prettify-1.4.1.tar.gz
  • Upload date:
  • Size: 493.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.14.0 Linux/6.6.87.2-microsoft-standard-WSL2

File hashes

Hashes for bs_notion_export_prettify-1.4.1.tar.gz
Algorithm Hash digest
SHA256 4ba3c6e3a676f10c4e643a0a555a7c04ad62a00ae0feb9f0e0e4192cb627495e
MD5 d8e9a8606eb8c22b1b59fa24c292e526
BLAKE2b-256 a6ec3ec1b19fc29cfe4fe74db105da01e40a492a2bc465165a7387d404a3e099

See more details on using hashes here.

File details

Details for the file bs_notion_export_prettify-1.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for bs_notion_export_prettify-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc0c75ddfb90c859a42d88151383221ec0bb7fa66d989c9bc6ee034d0af29cab
MD5 e75414dd290667f45d991ca4b32c28aa
BLAKE2b-256 7d9c90f0840505280f4ab994fe89517822d3f0c0e12b9748e695e09679dfccb6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page