{ "info": { "author": "Matthew Brett", "author_email": "matthew.brett@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering" ], "description": "##################################################\nnb2plots - converting between notebooks and sphinx\n##################################################\n\nSee the nb2plots documentation_ for more information.\n\n.. shared-text-body\n\n************\nWhat it does\n************\n\n``nb2plots`` converts Jupyter_ notebooks to ReST_ files for Sphinx_, and back\nagain.\n\nNb2plots assumes that the ReST document will become the source for your Sphinx\nweb pages, but also for future versions of the notebook. The notebook may\nserve as a draft for the polished ReST page, and an output format from the\nSphinx build. Why? Read on.\n\n****************************************\nWhy convert Jupyter notebooks to Sphinx?\n****************************************\n\nJupyter notebooks are just what the doctor ordered when hacking up a quick\ntutorial, or preparing a software demo. The problems start when you want to\ndo not-trivial edits to the notebooks, or you need features that notebooks\ndon't have, such as flexible cross-referencing, extensible markup, and so on.\nNotebooks are also painful to use with version control. These times make you\nwish your notebook was in a standard extensible text format, such as ReST_.\n\nYou could convert your notebook to ReST using the standard `nbconvert`_\ncommand, but this gives rather ugly ReST, and you lose all the nice code\nexecution and figure generation that the notebook is good at.\n\nEnter Nb2plots. The ``nb2plots`` command converts notebooks to specially\nformatted ReST pages. Use with::\n\n nb2plots notebook.ipynb > with_plots.rst\n\nNb2plots converts your notebook to not-very-ugly ReST, where the code cells\nbecome ``nbplot`` directives in your ReST file.\n\nSpecifically, a notebook code cell like this::\n\n a = 1\n\nbecomes (in the ReST document)::\n\n .. nbplot::\n\n >>> a = 1\n\nThe ``nbplot`` directives run the contained code when Sphinx builds your ReST\nfiles, and embed the results of any plots that your code makes. Actually,\n``nbplot`` is an extended and edited version of the `matplotlib plot\ndirective`_. Building your pages runs all the code and regenerates the\nfigures, and you get much of the reproducible goodness of the notebook\nexperience.\n\nYou can also run the standard Sphinx ``doctest`` extension over your pages to\ncheck the doctest output of the code cells.\n\nThe ReST version of your notebook has many advantages - it is easier to edit\nin your favorite text editor, and you can extend and configure the execution\nand display of the code in several different ways. For example, you can hide\nsome code cells (Nbplot directives) if the code is not interesting to your\npoint, but you still want the generated figure. You can configure your Nbplot\ndirectives to run different code for different configurations. For these\noptions, see |nbplot-documentation|. But - what do you lose, when going from\na notebook to a Nb2plots ReST document?\n\n**********************************\nI want notebooks and .py files too\n**********************************\n\nYou may also want a version of your document that your users can execute.\nPerhaps the page build is generating some tricky errors or warnings, and you\nwant to experiment with the code in the page interactively. Perhaps your\nusers are used to notebooks, and prefer the code in that format.\n\nNb2plots also contains Sphinx extensions that cause the Sphinx build to\ngenerate Python code files and Jupyter notebooks from the ReST source. When\nyou add the Nb2plots ReST directive ``code-links`` to your ReST page, it will\ncause the Sphinx build to create a Python code file and notebook versions of\nyour page, and adds download links to these versions::\n\n .. code-links::\n\nSee |code-links-documentation| for details.\n\n**************************\nShow me what it looks like\n**************************\n\nFor a very simple example, see |worked-example|.\n\nFor a moderate-sized teaching site that makes extensive use of Nb2plots, see\nhttps://matthew-brett.github.com/teaching.\n\n************\nInstallation\n************\n\n::\n\n pip install nb2plots\n\nYou will need Pandoc_ installed and available as the ``pandoc`` command.\n\nTo install Pandoc on OSX, we recommend homebrew_::\n\n brew install pandoc\n\n*************\nConfiguration\n*************\n\nAdd the following to your Sphinx ``conf.py`` file::\n\n extensions = [\"nb2plots\"]\n\nSee |nbplot-documentation| for the various ``conf.py`` configuration settings.\n\n****\nCode\n****\n\nSee https://github.com/matthew-brett/nb2plots\n\nReleased under the BSD two-clause license - see the file ``LICENSE`` in the\nsource distribution.\n\n`travis-ci `_ kindly tests the\ncode automatically under Python versions 2.7, and 3.3 through 3.5.\n\nThe latest released version is at https://pypi.python.org/pypi/nb2plots\n\n*****\nTests\n*****\n\n* Install ``nb2plots``\n* Install the pytest_ testing framework, the ``mock`` package, and the\n ``scripttester`` package.\n\n pip install pytest mock scripttester\n\n* Run the tests with::\n\n py.test --pyargs nb2plots\n\n*******\nSupport\n*******\n\nPlease put up issues on the `nb2plots issue tracker`_.\n\n.. standalone-references\n\n.. |nbplot-documentation| replace:: `nbplots documentation`_\n.. |worked-example| replace:: `worked example`_\n.. |code-links-documentation| replace:: `code-links documentation`_\n.. _nbplots documentation:\n https://matthew-brett.github.com/nb2plots/nbplots.html\n.. _code-links documentation:\n https://matthew-brett.github.com/nb2plots/code_links.html\n.. _worked example:\n https://matthew-brett.github.com/nb2plots/worked_example.html\n.. _documentation: https://matthew-brett.github.com/nb2plots\n.. _pandoc: http://pandoc.org\n.. _jupyter: jupyter.org\n.. _homebrew: brew.sh\n.. _sphinx: http://sphinx-doc.org\n.. _rest: http://docutils.sourceforge.net/rst.html\n.. _nb2plots issue tracker: https://github.com/matthew-brett/nb2plots/issues\n.. _matplotlib plot directive: http://matplotlib.org/sampledoc/extensions.html\n.. _nbconvert: http://nbconvert.readthedocs.org/en/latest/\n.. _pytest: https://pytest.readthedocs.io\n.. _mock: https://github.com/testing-cabal/mock", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/matthew-brett/nb2plots", "keywords": "", "license": "BSD license", "maintainer": "", "maintainer_email": "", "name": "nb2plots", "package_url": "https://pypi.org/project/nb2plots/", "platform": "", "project_url": "https://pypi.org/project/nb2plots/", "project_urls": { "Homepage": "http://github.com/matthew-brett/nb2plots" }, "release_url": "https://pypi.org/project/nb2plots/0.6/", "requires_dist": null, "requires_python": "", "summary": "Converting between ipython notebooks and sphinx docs", "version": "0.6" }, "last_serial": 3549148, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "f6a1a7b89bde03d5e1cf12032556b47f", "sha256": "31d4d0ada913cd9a57f42945cd061745e2d0482a04d9f2e42da11ed2e624955b" }, "downloads": -1, "filename": "nb2plots-0.1.tar.gz", "has_sig": true, "md5_digest": "f6a1a7b89bde03d5e1cf12032556b47f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30000, "upload_time": "2015-10-23T18:16:13", "url": "https://files.pythonhosted.org/packages/1d/35/170688cb59fa688ee352d87ec1ab2bf9eca451558f4284aeb6b91f9e04e8/nb2plots-0.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "6aff8aaf6d3c98b76200d80ae7c58d40", "sha256": "8601018567fdf71a93aa07056b555d817c96c60ec2d738a701422a2b3d597bec" }, "downloads": -1, "filename": "nb2plots-0.1.zip", "has_sig": true, "md5_digest": "6aff8aaf6d3c98b76200d80ae7c58d40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33284, "upload_time": "2015-10-23T18:16:37", "url": "https://files.pythonhosted.org/packages/4e/76/62c0ec2215feaba259426cf8e6ebcc12d1a32b589af8a134183f24b7fc1d/nb2plots-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "e845e56f93931a4aa4bc346212a9ed1b", "sha256": "0782dd244122e6b064bfbdfc3c61fef42b1aef23d49f5716345392ff30205ac3" }, "downloads": -1, "filename": "nb2plots-0.2.tar.gz", "has_sig": true, "md5_digest": "e845e56f93931a4aa4bc346212a9ed1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50050, "upload_time": "2015-11-15T04:06:29", "url": "https://files.pythonhosted.org/packages/80/d2/5cb9ab700c12fcf8ca9ebdeb84edbf5453ab8baa16d172ffe5cfb9a7cf30/nb2plots-0.2.tar.gz" }, { "comment_text": "", "digests": { "md5": "b00ca8bb99b141a395139e555e97f37c", "sha256": "beb73b51a9c8ec1eef01e56d71fdb9ad06741f1dac1ab7418adaf0b5e2312848" }, "downloads": -1, "filename": "nb2plots-0.2.zip", "has_sig": true, "md5_digest": "b00ca8bb99b141a395139e555e97f37c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57901, "upload_time": "2015-11-15T04:06:39", "url": "https://files.pythonhosted.org/packages/08/a0/64bf19b480e7811ccbecdac47e570693dd3fd1e9d5919a05ef8e93478a85/nb2plots-0.2.zip" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "5536bb396479678569fca3cd76ca0103", "sha256": "ac767404d0f11cf35539ec59a0609948c4e91fc9e1b64490433b78cc0475d8df" }, "downloads": -1, "filename": "nb2plots-0.3.tar.gz", "has_sig": true, "md5_digest": "5536bb396479678569fca3cd76ca0103", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50469, "upload_time": "2015-11-29T07:11:37", "url": "https://files.pythonhosted.org/packages/37/e7/3dd336965f735e4f741bf035653f7f05f938582f0138b99cec91f298ac63/nb2plots-0.3.tar.gz" }, { "comment_text": "", "digests": { "md5": "2754a3141ee678de9a3bcbe7641d20f3", "sha256": "c932cbc8e55441063cda67797f3d2e0081a9ee374ca67ae3dca0e5f532ab0752" }, "downloads": -1, "filename": "nb2plots-0.3.zip", "has_sig": true, "md5_digest": "2754a3141ee678de9a3bcbe7641d20f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 58338, "upload_time": "2015-11-29T07:11:48", "url": "https://files.pythonhosted.org/packages/87/f1/8e45b8b5eae7bb2514055787a160a2db8301913895637a41fcf7565e92ae/nb2plots-0.3.zip" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "c6745fc6ce0d9d06efb7f87ee3cd7e6c", "sha256": "886bba92f410476f4989ce6883a350e93a8e5806d3d9a675bd113cf6e4ffe99c" }, "downloads": -1, "filename": "nb2plots-0.4.zip", "has_sig": true, "md5_digest": "c6745fc6ce0d9d06efb7f87ee3cd7e6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 60011, "upload_time": "2016-11-10T09:07:11", "url": "https://files.pythonhosted.org/packages/23/88/3d4bfcf5af3eaf1ae0989bfeae9337d8ad105c40417fcbb4d7423533169b/nb2plots-0.4.zip" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "a62393c8f20efebbcda47323e44bc7f4", "sha256": "e2ab9f0bd2d519faed73f8e331571e126965a03d1e1282fda5a0782ce841e634" }, "downloads": -1, "filename": "nb2plots-0.5.zip", "has_sig": true, "md5_digest": "a62393c8f20efebbcda47323e44bc7f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 115756, "upload_time": "2016-12-20T01:10:31", "url": "https://files.pythonhosted.org/packages/72/22/19387b43470fa5d83e1933bcaec17f2c0af3bed39f790bd00c6b98991d7d/nb2plots-0.5.zip" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "267fe1ce6bc5675aacac9cdd6685fdd9", "sha256": "3ca91612f4b16698fcbadd872f2151556dae2a514d66ccc0a6fd442595b41e3c" }, "downloads": -1, "filename": "nb2plots-0.5.1.zip", "has_sig": true, "md5_digest": "267fe1ce6bc5675aacac9cdd6685fdd9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 164094, "upload_time": "2017-01-03T15:36:07", "url": "https://files.pythonhosted.org/packages/d7/d6/7bfdcbbeb78c8bf0bea34bfa70364553a712c9634e286458172d7679a186/nb2plots-0.5.1.zip" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "663fbc80432d2aa7bb13fe7f7e538864", "sha256": "6d9448368ab09271b1f5561f4529189b4c86ac10eadaee0de700d6316ba86085" }, "downloads": -1, "filename": "nb2plots-0.5.2.zip", "has_sig": true, "md5_digest": "663fbc80432d2aa7bb13fe7f7e538864", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 164829, "upload_time": "2017-07-30T00:15:39", "url": "https://files.pythonhosted.org/packages/3d/7a/5a44e49426054c988272bd10890ff9088bc51fdb3c7da97baf7f31b783ef/nb2plots-0.5.2.zip" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "730d9c0fb5958e94151a537859e0998a", "sha256": "ed3e62fad6701c0d3f4575b8a7037e69584e2d6e6cff47f786dd7a8c73fc9a6a" }, "downloads": -1, "filename": "nb2plots-0.6.tar.gz", "has_sig": false, "md5_digest": "730d9c0fb5958e94151a537859e0998a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 117926, "upload_time": "2018-02-03T21:10:37", "url": "https://files.pythonhosted.org/packages/95/b3/965a1b8e853999abdac2df6dea8f32928b20433fd8975efc5bab1ad8a199/nb2plots-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "730d9c0fb5958e94151a537859e0998a", "sha256": "ed3e62fad6701c0d3f4575b8a7037e69584e2d6e6cff47f786dd7a8c73fc9a6a" }, "downloads": -1, "filename": "nb2plots-0.6.tar.gz", "has_sig": false, "md5_digest": "730d9c0fb5958e94151a537859e0998a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 117926, "upload_time": "2018-02-03T21:10:37", "url": "https://files.pythonhosted.org/packages/95/b3/965a1b8e853999abdac2df6dea8f32928b20433fd8975efc5bab1ad8a199/nb2plots-0.6.tar.gz" } ] }