Name | jupyter-cell JSON |
Version |
2024.9.15
JSON |
| download |
home_page | None |
Summary | Jupyter Notebook → reStructuredText Cells |
upload_time | 2024-09-15 19:25:08 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | MIT License Copyright (c) 2024 Akshay Mestry. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
jupyter
sphinx
python
notebook
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
.. Author: Akshay Mestry <xa@mes3.dev>
.. Created on: Sunday, September 15 2024
.. Last updated on: Sunday, September 15 2024
===============================================================================
Jupyter Notebook → reStructuredText Cells
===============================================================================
A Python utility for converting Jupyter notebooks into reStructuredText cells
and splitting them into smaller snippets.
-------------------------------------------------------------------------------
What is JupyterCell?
-------------------------------------------------------------------------------
JupyterCell is an open-source tool designed to simplify the process of
embedding Jupyter Notebook cells into Sphinx websites. With JupyterCell, you
can convert your entire notebook into reStructuredText (rST) and automatically
split the converted content into smaller, manageable snippets-each containing
code cells and their outputs.
This project is built for educators, researchers, and developers who need a
more flexible way to include specific code snippets from notebooks in their
documentation projects. JupyterCell handles the tedious work of converting
and splitting, so you can focus on creating insightful content for your
audience.
-------------------------------------------------------------------------------
Getting Started
-------------------------------------------------------------------------------
Prerequisites
===============================================================================
- Python 3.11+
- Jupyter Notebook or Jupyter Lab
- Sphinx (for rST-based documentation)
- Optional: virtual environment (recommended)
To get started with JupyterCell, you'll need to have Python and the required
dependencies installed. Here's how you can set things up:
Installation
===============================================================================
.. code-block:: bash
python3 -m venv env
source env/bin/activate # On Windows, use `env\Scripts\activate`
Now, install the package directly from PyPI:
.. code-block:: bash
pip install jupyter-cell
-------------------------------------------------------------------------------
Usage
-------------------------------------------------------------------------------
You can use JupyterCell from the command line with the following syntax:
.. code-block:: bash
jupyter-cell --notebook path/to/notebook.ipynb [--prefix <prefix>] [--keep]
- --notebook (-n) **[Required]**: The path to the Jupyter notebook you want to
convert.
- --prefix **[Optional]**: Prefix for the generated snippet files (Default:
`cell-`).
- --keep **[Optional]**: Whether to keep the full RST file after splitting
into snippets (Default: `False`).
-------------------------------------------------------------------------------
Example
-------------------------------------------------------------------------------
Suppose you have a Jupyter Notebook called `some_notebook.ipynb` in your
current directory. To convert and split it into smaller rST snippets, run the
following command:
.. code-block:: bash
jupyter-cell --notebook some_notebook.ipynb --prefix snippet- --keep
This will produce:
- A full `some_notebook.rst` file.
- Several smaller files, each named snippet-1.rst, snippet-2.rst, etc.,
containing individual cells or cell/output pairs.
The `--keep` flag ensures that the original `some_notebook.rst` is preserved.
-------------------------------------------------------------------------------
Contributions
-------------------------------------------------------------------------------
Contributions and/or suggestions are welcome! If you find a bug, have a
feature request, or want to contribute improvements, please open an issue or
submit a pull request on GitHub.
-------------------------------------------------------------------------------
License
-------------------------------------------------------------------------------
JupyterCell is licensed under the MIT License. See the `LICENSE`_ file for
more details.
.. _LICENSE: https://github.com/xames3/jupyter-cell/blob/main/LICENSE
Raw data
{
"_id": null,
"home_page": null,
"name": "jupyter-cell",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "jupyter, sphinx, python, notebook",
"author": null,
"author_email": "Akshay Mestry <xa@mes3.dev>",
"download_url": "https://files.pythonhosted.org/packages/a2/8d/5d18d6055ed06d500ddc6a4da37e72d436bb90de3afebbfca6c0b6267bdd/jupyter_cell-2024.9.15.tar.gz",
"platform": null,
"description": ".. Author: Akshay Mestry <xa@mes3.dev>\n.. Created on: Sunday, September 15 2024\n.. Last updated on: Sunday, September 15 2024\n\n===============================================================================\nJupyter Notebook \u2192 reStructuredText Cells\n===============================================================================\n\nA Python utility for converting Jupyter notebooks into reStructuredText cells\nand splitting them into smaller snippets.\n\n-------------------------------------------------------------------------------\nWhat is JupyterCell?\n-------------------------------------------------------------------------------\n\nJupyterCell is an open-source tool designed to simplify the process of\nembedding Jupyter Notebook cells into Sphinx websites. With JupyterCell, you\ncan convert your entire notebook into reStructuredText (rST) and automatically\nsplit the converted content into smaller, manageable snippets-each containing\ncode cells and their outputs.\n\nThis project is built for educators, researchers, and developers who need a\nmore flexible way to include specific code snippets from notebooks in their\ndocumentation projects. JupyterCell handles the tedious work of converting\nand splitting, so you can focus on creating insightful content for your\naudience.\n\n-------------------------------------------------------------------------------\nGetting Started\n-------------------------------------------------------------------------------\n\nPrerequisites\n===============================================================================\n\n- Python 3.11+\n- Jupyter Notebook or Jupyter Lab\n- Sphinx (for rST-based documentation)\n- Optional: virtual environment (recommended)\n\nTo get started with JupyterCell, you'll need to have Python and the required\ndependencies installed. Here's how you can set things up:\n\nInstallation\n===============================================================================\n\n.. code-block:: bash\n\n python3 -m venv env\n source env/bin/activate # On Windows, use `env\\Scripts\\activate`\n\nNow, install the package directly from PyPI:\n\n.. code-block:: bash\n\n pip install jupyter-cell\n\n-------------------------------------------------------------------------------\nUsage\n-------------------------------------------------------------------------------\n\nYou can use JupyterCell from the command line with the following syntax:\n\n.. code-block:: bash\n\n jupyter-cell --notebook path/to/notebook.ipynb [--prefix <prefix>] [--keep]\n\n- --notebook (-n) **[Required]**: The path to the Jupyter notebook you want to\n convert.\n- --prefix **[Optional]**: Prefix for the generated snippet files (Default:\n `cell-`).\n- --keep **[Optional]**: Whether to keep the full RST file after splitting\n into snippets (Default: `False`).\n\n-------------------------------------------------------------------------------\nExample\n-------------------------------------------------------------------------------\n\nSuppose you have a Jupyter Notebook called `some_notebook.ipynb` in your\ncurrent directory. To convert and split it into smaller rST snippets, run the\nfollowing command:\n\n.. code-block:: bash\n\n jupyter-cell --notebook some_notebook.ipynb --prefix snippet- --keep\n\nThis will produce:\n\n- A full `some_notebook.rst` file.\n- Several smaller files, each named snippet-1.rst, snippet-2.rst, etc.,\n containing individual cells or cell/output pairs.\n\nThe `--keep` flag ensures that the original `some_notebook.rst` is preserved.\n\n-------------------------------------------------------------------------------\nContributions\n-------------------------------------------------------------------------------\n\nContributions and/or suggestions are welcome! If you find a bug, have a\nfeature request, or want to contribute improvements, please open an issue or\nsubmit a pull request on GitHub.\n\n-------------------------------------------------------------------------------\nLicense\n-------------------------------------------------------------------------------\n\nJupyterCell is licensed under the MIT License. See the `LICENSE`_ file for\nmore details.\n\n.. _LICENSE: https://github.com/xames3/jupyter-cell/blob/main/LICENSE\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Akshay Mestry. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Jupyter Notebook \u2192 reStructuredText Cells",
"version": "2024.9.15",
"project_urls": {
"Code": "https://github.com/xames3/jupyter-cell",
"Download": "https://pypi.org/project/jupyter-cell/",
"Homepage": "https://github.com/xames3/jupyter-cell/",
"Issue tracker": "https://github.com/xames3/jupyter-cell/issues"
},
"split_keywords": [
"jupyter",
" sphinx",
" python",
" notebook"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d0d6f01186c82d3e6f9aa872fee404b814499b7470dab107be4f4f69e90f1968",
"md5": "8c0f5dfdd24a1e53f0454c23bec2651c",
"sha256": "3975a5ed9cc54f461715c840eb5d91bc10903059b6b2d7e247ebb078c7c6fa09"
},
"downloads": -1,
"filename": "jupyter_cell-2024.9.15-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8c0f5dfdd24a1e53f0454c23bec2651c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 10480,
"upload_time": "2024-09-15T19:25:06",
"upload_time_iso_8601": "2024-09-15T19:25:06.596776Z",
"url": "https://files.pythonhosted.org/packages/d0/d6/f01186c82d3e6f9aa872fee404b814499b7470dab107be4f4f69e90f1968/jupyter_cell-2024.9.15-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a28d5d18d6055ed06d500ddc6a4da37e72d436bb90de3afebbfca6c0b6267bdd",
"md5": "38892c3d098ba9eeb3cee91911bb8fcf",
"sha256": "90523f689c4b53a5c17de50637d4e8339f4c2af50a61efdc2ec8238aeaac1616"
},
"downloads": -1,
"filename": "jupyter_cell-2024.9.15.tar.gz",
"has_sig": false,
"md5_digest": "38892c3d098ba9eeb3cee91911bb8fcf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 11925,
"upload_time": "2024-09-15T19:25:08",
"upload_time_iso_8601": "2024-09-15T19:25:08.364945Z",
"url": "https://files.pythonhosted.org/packages/a2/8d/5d18d6055ed06d500ddc6a4da37e72d436bb90de3afebbfca6c0b6267bdd/jupyter_cell-2024.9.15.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-15 19:25:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "xames3",
"github_project": "jupyter-cell",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "jupyter-cell"
}