{ "info": { "author": "Andreas Herten", "author_email": "a.herten@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# Jupyter Notebook Splitter\n\nThis tool splits a Jupyter Notebook into Sub-Notebooks depending on cell metadata. It converts a *Master* Notebook into a *Teacher* Notebook and a *Student* Notebook; or into a *Slides* Notebook, a *Tasks* Notebook, and a *Solutions* Notebook.\n\n## Installation\n\nAlthough the Notebook Splitter is only a single file it can be installed via `pip`\n\n```bash\npip install notebook-splitter\n```\n\n## Usage\n\n### Overview\n\n**TL;DR: See `./notebook-splitter.py --help`.**\n\n1. Add [cell metadata](https://ipython.org/ipython-doc/3/notebook/nbformat.html#cell-metadata) to your Jupyter Notebook: Add an `exercise` key (default, can be changed) to the metadata (JSON); give it values (*tags*) on which to create Sub-Notebooks\n\n ```json\n {\n \"exercise\": \"task\"\n }\n // another cell\n {\n \"exercise\": \"solution\"\n }\n ```\n\n2. Use `--keep` and `--remove` flags of the Notebook Splitter to keep and remove cells with according *tags*; export it to the respective Notebook:\n\n ```bash\n ./notebook-splitter.py input.ipynb --keep task --remove solution -o tasks.ipynb\n ./notebook-splitter.py input.ipynb --keep solution --remove task -o solutions.ipynb\n ./notebook-splitter.py input.ipynb --remove task --remove solution -o slides.ipynb\n ```\n\n### Examples in Action\n\nSee the `examples` directory in this repository.\n\n### Options\n\n* **Repeated Parameters**: `--keep` and `--remove` parameters on the command line of the script can be given multiple times: `--keep task --keep onlytask --remove solution`\n* **Remove *All***: As a special parameter value, `--remove all` will remove *all* cells except those for which a `--keep` value is specified (*`--keep all`* is the default)\n* **Stdin/Stdout**: If no output file is given with `-o`/`--output`, the resulting Notebook will be printed to `stdout`; if no input file as a parameter is given, the input Notebook will be read from `stdin` (good for Linux-like daisy-chaining of tools)\n* **Change *Basekey***: In the above example, the cell meta data key of discrimination is `exercise` which is the default. With `--basekey`, this can be changed.\n\n### Limitations\n\nThe values to the `--keep` and `--remove` parameters create sets of values to keep and remove. One could implement this tool probably quite cleverly with set operations (with the added complication of the `--remove all` ). If you can, feel free to file a merge request!\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/AndiH/notebook-splitter", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "notebook-splitter", "package_url": "https://pypi.org/project/notebook-splitter/", "platform": "", "project_url": "https://pypi.org/project/notebook-splitter/", "project_urls": { "Homepage": "https://github.com/AndiH/notebook-splitter" }, "release_url": "https://pypi.org/project/notebook-splitter/1.3/", "requires_dist": null, "requires_python": "", "summary": "Jupyter Notebook Splitter", "version": "1.3" }, "last_serial": 4916030, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "1b381476f048b0559e8ca572a65aaaf7", "sha256": "088c322c3d347ab812424c7cf08c1a5c68c0f9f9faad0508fc59879d1c4568cb" }, "downloads": -1, "filename": "notebook_splitter-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1b381476f048b0559e8ca572a65aaaf7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3408, "upload_time": "2019-03-08T15:32:57", "url": "https://files.pythonhosted.org/packages/6f/8d/77d066051c18e318c2960a8b5477a14df4900afbc1278f9afb29b0a0c9cf/notebook_splitter-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ca72abd35b336a2610fa2f5279797edb", "sha256": "ee9af05d0baaf10c2e590808ac150f641fa7f11105a3f49afc6a1a26e8e344ec" }, "downloads": -1, "filename": "notebook_splitter-1.1.tar.gz", "has_sig": false, "md5_digest": "ca72abd35b336a2610fa2f5279797edb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2885, "upload_time": "2019-03-08T15:32:59", "url": "https://files.pythonhosted.org/packages/30/9b/fa73b197935523955c2354df6acf3c80e0f9004ceddb7621d8141f744d6f/notebook_splitter-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "b36948a40a3f85b36a9dec5254322ee6", "sha256": "fb9c25eb111d8a32f187d2e8b40ec45b0a3250b236763439a636e872fe14da2a" }, "downloads": -1, "filename": "notebook_splitter-1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b36948a40a3f85b36a9dec5254322ee6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4454, "upload_time": "2019-03-08T15:38:34", "url": "https://files.pythonhosted.org/packages/08/63/53592fd5f1cfdf37ee6e9eb01f55fa4a0def18d894a251370ae2c37be10f/notebook_splitter-1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2e0c9a3318893e18c707fd9bbde5575d", "sha256": "bb455a26c96830903b1e6964798de3173b54f2606b993edfcb5648954eba507b" }, "downloads": -1, "filename": "notebook_splitter-1.2.tar.gz", "has_sig": false, "md5_digest": "2e0c9a3318893e18c707fd9bbde5575d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3158, "upload_time": "2019-03-08T15:38:35", "url": "https://files.pythonhosted.org/packages/db/64/f20fddcc30f7dd4e2519828b9e4c5f2e59ce3e2c37115feced1d8b54b6a9/notebook_splitter-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "f5b6aae460e40f1eb5c91f64439b18d7", "sha256": "df275f2b68fd56dd88c6fd274ed727457e5ec556f0d10b1c60975040b563f744" }, "downloads": -1, "filename": "notebook_splitter-1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "f5b6aae460e40f1eb5c91f64439b18d7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4450, "upload_time": "2019-03-08T15:41:12", "url": "https://files.pythonhosted.org/packages/02/69/1aaf53eaac234e362c56ddcb36b1420c6bc0d53114f19221d93138d444c3/notebook_splitter-1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e31d2e51154c7db28dafda5041bb0424", "sha256": "c9635b7002831639ab835946d89cca9a40b76456e76898407a489cf35150dcac" }, "downloads": -1, "filename": "notebook_splitter-1.3.tar.gz", "has_sig": false, "md5_digest": "e31d2e51154c7db28dafda5041bb0424", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3162, "upload_time": "2019-03-08T15:41:14", "url": "https://files.pythonhosted.org/packages/61/8f/dace5de8c10fc68b821512704665be2c630f99a93c4da8c084b56077a5c8/notebook_splitter-1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f5b6aae460e40f1eb5c91f64439b18d7", "sha256": "df275f2b68fd56dd88c6fd274ed727457e5ec556f0d10b1c60975040b563f744" }, "downloads": -1, "filename": "notebook_splitter-1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "f5b6aae460e40f1eb5c91f64439b18d7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4450, "upload_time": "2019-03-08T15:41:12", "url": "https://files.pythonhosted.org/packages/02/69/1aaf53eaac234e362c56ddcb36b1420c6bc0d53114f19221d93138d444c3/notebook_splitter-1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e31d2e51154c7db28dafda5041bb0424", "sha256": "c9635b7002831639ab835946d89cca9a40b76456e76898407a489cf35150dcac" }, "downloads": -1, "filename": "notebook_splitter-1.3.tar.gz", "has_sig": false, "md5_digest": "e31d2e51154c7db28dafda5041bb0424", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3162, "upload_time": "2019-03-08T15:41:14", "url": "https://files.pythonhosted.org/packages/61/8f/dace5de8c10fc68b821512704665be2c630f99a93c4da8c084b56077a5c8/notebook_splitter-1.3.tar.gz" } ] }