Skip to main content

Convert Jupyter notebooks to beautiful HTML with the Rosé Pine dark theme

Project description

🌸 nbrose

Convert Jupyter notebooks to beautiful, self-contained HTML with the Rosé Pine dark theme.

PyPI version Python License: MIT PyPI


✨ Features

  • 🎨 Rosé Pine dark theme — full color palette applied to every element
  • 🖍️ Python syntax highlighting — keywords, builtins, strings, comments, decorators, all inline-styled
  • 📖 Auto-generated TOC — sidebar with scroll-spy active state
  • 👤 Author footer — reads a special ## Author cell and renders SVG icon links
  • 👁️ Show / Hide code — per-cell toggle and global "Code ▾" dropdown
  • 📱 Fully responsive — mobile-friendly layout with slide-in TOC
  • 🔒 Self-contained HTML — favicon embedded as base64, no external dependencies required for offline use
  • Zero dependencies — pure Python stdlib only

📦 Installation

pip install nbrose

🔗 PyPI page: https://pypi.org/project/nbrose/


🚀 Usage

CLI

# Basic usage
nbrose notebook.ipynb

# Custom output path and title
nbrose notebook.ipynb -o report.html --title "My Analysis"

Python API

from nbrose import convert

# Simple conversion
convert("notebook.ipynb")

# Custom output and title
convert("notebook.ipynb", output_path="report.html", title="My Analysis")

👤 Author Cell

Add a special markdown cell anywhere in your notebook to generate a footer with social links:

## Author

- **Name:** Jahid Hasan
- **Site:** https://msjahid.github.io
- **GitHub:** https://github.com/msjahid
- **LinkedIn:** https://linkedin.com/in/msjahid
- **Kaggle:** https://kaggle.com/msjahid
- **Twitter:** https://x.com/msjahids
- **Email:** msjahid.ai@gmail.com

The ## Author cell is automatically hidden from the rendered output and displayed as a clean footer with SVG icon buttons.


🗂️ Project Structure

nbrose/
├── nbrose/
│   ├── __init__.py
│   ├── converter.py      ← core converter
│   ├── cli.py            ← command-line interface
│   └── favicon.png       ← embedded favicon
├── tests/
│   └── test_converter.py
├── pyproject.toml
├── README.md
└── LICENSE

🎨 Theme Colors

Name Hex Usage
Base #191724 Page background
Surface #1f1d2e Code cell background
Overlay #26233a Code header, inline code
Iris #c4a7e7 Keywords, titles, links
Foam #9ccfd8 Numbers, builtins
Gold #f6c177 Strings, strong text
Rose #ebbcba Function calls
Love #eb6f92 Errors, email icon
Pine #31748f Decorators, headings
Muted #6e6a86 Comments, metadata

🛠️ Development

git clone https://github.com/msjahid/nbrose.git
cd nbrose
pip install -e .

# Run tests
python -m pytest tests/

📄 License

MIT © Jahid Hasan


Maintained with ❤ by 𝓂𝓈𝒿𝒶𝒽𝒾𝒹

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

nbrose-0.0.1.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

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

nbrose-0.0.1-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file nbrose-0.0.1.tar.gz.

File metadata

  • Download URL: nbrose-0.0.1.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for nbrose-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9690fc47bc88bcde00d12121947ffe3a9eb28600bf4cd004a4562a6be98cd08b
MD5 333df3749c14050c904464e5bd172adf
BLAKE2b-256 ca2caddd53f86614d5c3d63ee21078166970d07bd5379021e39aaff949b496fc

See more details on using hashes here.

File details

Details for the file nbrose-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: nbrose-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for nbrose-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fff2c066d4762c8e5be0d9cc5c559b474b89def78276013de1556af19703b5a1
MD5 58dba8a4ad090b5ccc09891d00fe45b2
BLAKE2b-256 dbe66ae9534f6ead1ed0a4d18bf7c0d391fd63ecb2a439dabf909dd4d93b8849

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