Skip to main content

Jupyter docx bundler extension

PyPi Version Conda Version Conda Version CI codecov

Jupyter bundler extension to export notebook as a docx file

Installation

Using conda

conda install -c conda-forge jupyter-docx-bundler

Using pip

Make sure you have Pandoc installed, see installing-pandoc for instructions.

pip install jupyter-docx-bundler

Usage

Adding Metadata

The bundle extension uses metadata of the notebook, if you you provide it.

  • "title": "Notebook title"
  • "authors": [{"name": "author1"}, {"name": "author2"}]
  • "subtitle": "Notebook subtitle"
  • "date": "Notebook date"

The notebook metadata can be edited under Edit -> Edit Notebook Metadata.

Hiding inputs or complete code cells

You can hide individual code cells or just their inputs by defining cell tags:

  • nbconvert-remove-cell: Remove the entire cell
  • nbconvert-remove-input: Remove the input code of the cell

(Currently there are no default values configured for these tags, the ones listed above are defined in my code and not in nbconvert. This may will change in the future.)

Cell tags can be shown by activating the cell toolbar under View -> Cell Toolbar -> Tags.

Hiding all inputs

It is also possible to hide all inputs. To achive this you need to add the following lines to your notebook metadata:

{
    "jupyter-docx-bundler": {
        "exclude_input": "True"
    }
}

The notebook metadata can be edited under Edit -> Edit Notebook Metadata.

Direct call from console (nbconvert)

To use the bundler direct from console the nbconvert utility can be used with target format docx:

  • jupyter nbconvert --execute --to=docx <source notebook>.ipynb --output <target document>.docx

The --execute option should be used to ensure that the notebook is run before generation.

Development

See CONTRIBUTING

Metadata

Release files for jupyter-docx-bundler 0.4.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 jupyter-docx-bundler 0.4.0
File Size Uploaded
jupyter-docx-bundler-0.4.0.tar.gz 21.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyter-docx-bundler 0.4.0
File Interpreter ABI Platform
jupyter_docx_bundler-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.4 kB

Release files / jupyter-docx-bundler-0.4.0.tar.gz

Download URL jupyter-docx-bundler-0.4.0.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
82e15319bcac37ab72e981f410d7ff52cfba9d52df7aa54da747e39a53e0cd3c
BLAKE2b-256 checksum
How to use checksums
47bf29cf4c935235cac96fec77bc232f2df69383f73cf66fd6d374d280731995
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / jupyter_docx_bundler-0.4.0-py3-none-any.whl

Download URL jupyter_docx_bundler-0.4.0-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd7e61c09f2c401d237da34ff017b1c4c8b7831767e8307f94ee7b7724ad70e1
BLAKE2b-256 checksum
How to use checksums
e9cf7007d2571a59cc96d8c457c41e713360eb937ec105f83ce6f9addfa15f99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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