jupyter-docx-bundler


Namejupyter-docx-bundler JSON
Version 0.4.0 PyPI version JSON
download
home_page
SummaryJupyter bundler extension to export notebook as a docx file
upload_time2023-08-20 13:13:50
maintainer
docs_urlNone
author
requires_python>=3.6
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Jupyter docx bundler extension

[![PyPi Version](https://img.shields.io/pypi/v/jupyter-docx-bundler.svg)](https://pypi.org/project/jupyter-docx-bundler/)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/jupyter-docx-bundler.svg)](https://anaconda.org/conda-forge/jupyter-docx-bundler)
[![Conda Version](https://img.shields.io/conda/vn/mrossi/jupyter-docx-bundler.svg)](https://anaconda.org/mrossi/jupyter-docx-bundler)
[![CI](https://github.com/m-rossi/jupyter-docx-bundler/workflows/CI/badge.svg)](https://github.com/m-rossi/jupyter-docx-bundler/actions)
[![codecov](https://codecov.io/gh/m-rossi/jupyter-docx-bundler/branch/main/graph/badge.svg)](https://codecov.io/gh/m-rossi/jupyter-docx-bundler)

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](https://pandoc.org) installed, see [installing-pandoc](https://github.com/bebraw/pypandoc#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](https://github.com/jupyter/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:

```json
{
    "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](CONTRIBUTING.md)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "jupyter-docx-bundler",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Marco Rossi <developer@marco-rossi.com>",
    "download_url": "https://files.pythonhosted.org/packages/47/bf/29cf4c935235cac96fec77bc232f2df69383f73cf66fd6d374d280731995/jupyter-docx-bundler-0.4.0.tar.gz",
    "platform": null,
    "description": "# Jupyter docx bundler extension\n\n[![PyPi Version](https://img.shields.io/pypi/v/jupyter-docx-bundler.svg)](https://pypi.org/project/jupyter-docx-bundler/)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/jupyter-docx-bundler.svg)](https://anaconda.org/conda-forge/jupyter-docx-bundler)\n[![Conda Version](https://img.shields.io/conda/vn/mrossi/jupyter-docx-bundler.svg)](https://anaconda.org/mrossi/jupyter-docx-bundler)\n[![CI](https://github.com/m-rossi/jupyter-docx-bundler/workflows/CI/badge.svg)](https://github.com/m-rossi/jupyter-docx-bundler/actions)\n[![codecov](https://codecov.io/gh/m-rossi/jupyter-docx-bundler/branch/main/graph/badge.svg)](https://codecov.io/gh/m-rossi/jupyter-docx-bundler)\n\nJupyter bundler extension to export notebook as a docx file\n\n## Installation\n\n### Using conda\n\n```\nconda install -c conda-forge jupyter-docx-bundler\n```\n\n### Using pip\n\nMake sure you have [Pandoc](https://pandoc.org) installed, see [installing-pandoc](https://github.com/bebraw/pypandoc#installing-pandoc) for instructions.\n\n```\npip install jupyter-docx-bundler\n```\n\n## Usage\n\n### Adding Metadata\n\nThe bundle extension uses metadata of the notebook, if you you provide it.\n\n* `\"title\": \"Notebook title\"`\n* `\"authors\": [{\"name\": \"author1\"}, {\"name\": \"author2\"}]`\n* `\"subtitle\": \"Notebook subtitle\"`\n* `\"date\": \"Notebook date\"`\n\nThe notebook metadata can be edited under _Edit_ -> _Edit Notebook Metadata_.\n\n### Hiding inputs or complete code cells\n\nYou can hide individual code cells or just their inputs by defining cell tags:\n\n* `nbconvert-remove-cell`: Remove the entire cell\n* `nbconvert-remove-input`: Remove the input code of the cell\n\n_(Currently there are no default values configured for these tags, the ones listed above are defined in my code and not in [nbconvert](https://github.com/jupyter/nbconvert). This may will change in the future.)_\n\nCell tags can be shown by activating the cell toolbar under _View_ -> _Cell Toolbar_ -> _Tags_.\n\n#### Hiding all inputs\n\nIt is also possible to hide all inputs. To achive this you need to add the following lines to your notebook metadata:\n\n```json\n{\n    \"jupyter-docx-bundler\": {\n        \"exclude_input\": \"True\"\n    }\n}\n```\n\nThe notebook metadata can be edited under _Edit_ -> _Edit Notebook Metadata_.\n\n### Direct call from console (nbconvert)\n\nTo use the bundler direct from console the nbconvert utility can be used with target format docx:\n\n* `jupyter nbconvert --execute --to=docx <source notebook>.ipynb --output <target document>.docx`\n\nThe `--execute` option should be used to ensure that the notebook is run before generation.\n\n## Development\n\nSee [CONTRIBUTING](CONTRIBUTING.md)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Jupyter bundler extension to export notebook as a docx file",
    "version": "0.4.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/m-rossi/jupyter-docx-bundler/issues",
        "changelog": "https://github.com/m-rossi/jupyter-docx-bundler/blob/main/CHANGELOG.md",
        "repository": "https://github.com/m-rossi/jupyter-docx-bundler"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9cf7007d2571a59cc96d8c457c41e713360eb937ec105f83ce6f9addfa15f99",
                "md5": "f234d44ecf86d079230467e8fe3484c8",
                "sha256": "cd7e61c09f2c401d237da34ff017b1c4c8b7831767e8307f94ee7b7724ad70e1"
            },
            "downloads": -1,
            "filename": "jupyter_docx_bundler-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f234d44ecf86d079230467e8fe3484c8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 13895,
            "upload_time": "2023-08-20T13:13:48",
            "upload_time_iso_8601": "2023-08-20T13:13:48.390131Z",
            "url": "https://files.pythonhosted.org/packages/e9/cf/7007d2571a59cc96d8c457c41e713360eb937ec105f83ce6f9addfa15f99/jupyter_docx_bundler-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "47bf29cf4c935235cac96fec77bc232f2df69383f73cf66fd6d374d280731995",
                "md5": "676043c7caa7fa4473d9b505d91ebea8",
                "sha256": "82e15319bcac37ab72e981f410d7ff52cfba9d52df7aa54da747e39a53e0cd3c"
            },
            "downloads": -1,
            "filename": "jupyter-docx-bundler-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "676043c7caa7fa4473d9b505d91ebea8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 21538,
            "upload_time": "2023-08-20T13:13:50",
            "upload_time_iso_8601": "2023-08-20T13:13:50.004899Z",
            "url": "https://files.pythonhosted.org/packages/47/bf/29cf4c935235cac96fec77bc232f2df69383f73cf66fd6d374d280731995/jupyter-docx-bundler-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-20 13:13:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "m-rossi",
    "github_project": "jupyter-docx-bundler",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "jupyter-docx-bundler"
}
        
Elapsed time: 0.10055s