Skip to main content

nixnb

Bi-directional Jupyter Notebook conversion tool.

  • Forward: Turn .ipynb or Jupyter-exported HTML into a clean, responsive page that works on desktop, tablet, and mobile
  • Reverse: Restore such HTML back to .ipynb, recovering code, markdown, and outputs as a validated nbformat notebook

Installation

pip install nixnb

For .ipynb input (forward mode), nbconvert is also required:

pip install nbconvert

Usage

Forward: ipynb/html → beautified HTML

nixnb notebook.ipynb                    # → notebook-beautified.html
nixnb notebook.html                     # → notebook-beautified.html
nixnb notebook.html -o output.html      # explicit output path
nixnb notebook.html -o outputs/         # output to directory

Reverse: html → ipynb

nixnb notebook.html -o output.ipynb     # trigger by .ipynb suffix
nixnb notebook.html --to-ipynb          # explicit flag, auto-named output
nixnb notebook.html --to-ipynb -o out.ipynb

Full help

nixnb -h

Features

  • Responsive layout (desktop / tablet / mobile)
  • Floating sidebar TOC (desktop), drawer TOC (mobile)
  • Styled pandas DataFrames (zebra striping, hover highlight, tabular numbers)
  • Re-colored syntax highlighting
  • Auto-resize images
  • Reverse conversion preserves code, markdown, and outputs as validated nbformat notebooks (correct output types, cell IDs, and metadata)

Credits

Reverse conversion is based on takluyver/html_to_ipynb, with additions: (1) it works on the beautified HTML that nixnb itself produces, (2) it preserves cell outputs — text, DataFrames, and images — rather than dropping them, (3) it strips stray whitespace so the recovered source code is clean, and (4) it builds notebooks through the official nbformat library so the output validates against the nbformat 4.5 specification.

License

MIT

Metadata

Release files for nixnb 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nixnb 0.1.0
File Size Uploaded
nixnb-0.1.0.tar.gz 13.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nixnb 0.1.0
File Interpreter ABI Platform
nixnb-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.6 kB

Release files / nixnb-0.1.0.tar.gz

Download URL nixnb-0.1.0.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e58d1e22f4ae56e0eb3806c67c3f55ffef82b6321d2a2ae515154bd1a4868f96
BLAKE2b-256 checksum
How to use checksums
13ae3be8d9165a53f74beea61f088f1d4808bf4dd2870b5ec251889a3ae671e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Release files / nixnb-0.1.0-py3-none-any.whl

Download URL nixnb-0.1.0-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b80cfd38f10f01f7d66cf5c18195ac3b9408ccaeb224a103f5d8f92a61321321
BLAKE2b-256 checksum
How to use checksums
1b833195970e869ac8c2518b2ed7886e0f89fde136aa1485fa50fc159af1f533
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page