{ "info": { "author": "Caio Marcellos", "author_email": "caiocuritiba@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Documentation", "Topic :: Text Processing :: Filters", "Topic :: Utilities" ], "description": "filter_pandoc_run_py\r\n====================\r\n\r\n|Build Status| |Coverage Status| |PyPI version| |PyPI format| |License|\r\n|Python version| |Development Status|\r\n\r\n*filter_pandoc_run_py* is a `pandoc `__ filter for\r\nexecute python codes written in ``CodeBlocks`` or inline ``Code``. It\r\nreceives the print statement output and place it to the markdown\r\nconverted file. Also, it save any created pyplot figure to a folder and\r\ninclude it as an image. Code has to be **trusted**\r\n\r\n.. raw:: html\r\n\r\n \r\n\r\nUsage\r\n-----\r\n\r\nTo apply the filter, use the following option with pandoc:\r\n\r\n::\r\n\r\n pandoc INPUT_FILE -F filter_pandoc_run_py --to OUTPUT_FORMAT -o OUTPUT_FILE\r\n\r\nExample:\r\n\r\n::\r\n\r\n pandoc ./tests/test.md -F filter_pandoc_run_py -t gfm -o test_converted.md\r\n\r\n- You can convert it to any pandoc supported format;\r\n- When converted to a markdown format it can change some part of the\r\n text to conform with the default style (e.g.\u00a0changing setext-style\r\n headers to ATX headers).\r\n\r\nInstallation\r\n------------\r\n\r\n*filter_pandoc_run_py* requires [python] (tested in version > 3.0)\r\n\r\nInstall *filter_pandoc_run_py* as root using the bash command\r\n\r\n::\r\n\r\n git clone URL\r\n cd dir\r\n pip install .\r\n\r\nOr get it from PYPI:\r\n\r\n::\r\n\r\n pip install filter_pandoc_run_py\r\n\r\nHow to Use It\r\n-------------\r\n\r\nCreate a regular markdown code but appending a class .run to it.\r\n\r\nFor ``CodeBlock``\r\n~~~~~~~~~~~~~~~~~\r\n\r\nOutput print statement as a BlockQuote or paragraph. You can hide the\r\ngeneration code.\r\n\r\nSyntax:\r\n``{.python .run format=[blockquote (default), text] hide_code=[False (default), True] }``\r\n\r\nThe following syntax is also support for enabling standard IDE code\r\nhighlight:\r\n\r\n::\r\n\r\n ```python\r\n #filter: {.run format=[blockquote (default), text] hide_code=[False (default), True] }\r\n .... code ....\r\n ```\r\n\r\n\u201cPretty print\u201d enable: output of print statement is converted and is\r\nrendered\r\n\r\nFor ``Code``\r\n~~~~~~~~~~~~\r\n\r\nOutput print statement as inline text.\r\n\r\nThe syntax is:\r\n\r\n::\r\n\r\n `print(code)`{.run}\r\n\r\n\u201cPretty print\u201d enable: output of print statement is converted and is\r\nrendered\r\n\r\nExample\r\n-------\r\n\r\nFrom a markdown file such as:\r\n\r\n::\r\n\r\n ```{.python .run}\r\n d = 1e3\r\n m = 2 * d\r\n print('The total mass is {:.2f} $m^3$'.format(m))\r\n ```\r\n\r\n``pandoc FILE --to markdown -F filter_pandoc_run_py.py -o OUTFILE.md``\r\n\r\n.. code:: markdown\r\n\r\n > Output:\r\n >\r\n > > The total mass is 2000.00 $m^3$\r\n\r\nGenerating pyplot images embedded in markdown file:\r\n\r\n::\r\n\r\n ```{.python .run caption=\"Figure Number One\" label=\"my_fig\"}\r\n import matplotlib\r\n matplotlib.use('AGG')\r\n from matplotlib import pyplot as plt\r\n plt.plot([1, 2], [3, 4], 'dr-')\r\n ```\r\n\r\nMore examples\r\n~~~~~~~~~~~~~\r\n\r\n- Check files ``./tests/test.md`` and ``./tests/test_common_mark.md``\r\n\r\nGetting Help\r\n------------\r\n\r\nIf you have any difficulties with *filter_pandoc_run_py*, please feel\r\nwelcome to `file an\r\nissue `__ on\r\ngithub so that we can help.\r\n\r\n.. |Build Status| image:: https://img.shields.io/travis/caiofcm/filter_pandoc_run_py/master.svg\r\n :target: https://travis-ci.org/caiofcm/filter_pandoc_run_py/branches\r\n.. |Coverage Status| image:: https://coveralls.io/repos/github/caiofcm/filter_pandoc_run_py/badge.svg?branch=master\r\n :target: https://coveralls.io/github/caiofcm/filter_pandoc_run_py?branch=master\r\n.. |PyPI version| image:: https://img.shields.io/pypi/v/filter_pandoc_run_py.svg\r\n :target: https://pypi.org/project/filter_pandoc_run_py/\r\n.. |PyPI format| image:: https://img.shields.io/pypi/format/filter_pandoc_run_py.svg\r\n :target: https://pypi.org/project/filter_pandoc_run_py/\r\n.. |License| image:: https://img.shields.io/pypi/l/filter_pandoc_run_py.svg\r\n :target: https://raw.githubusercontent.com/caiofcm/filter_pandoc_run_py/master/LICENSE\r\n.. |Python version| image:: https://img.shields.io/pypi/pyversions/filter_pandoc_run_py.svg\r\n :target: https://pypi.org/project/filter_pandoc_run_py/\r\n.. |Development Status| image:: https://img.shields.io/pypi/status/filter_pandoc_run_py.svg\r\n :target: https://pypi.org/project/filter_pandoc_run_py/\r\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/caiofcm/filter_pandoc_run_py/archive/0.1.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/caiofcm/filter_pandoc_run_py", "keywords": "pandoc filters markdown python notes", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "filter_pandoc_run_py", "package_url": "https://pypi.org/project/filter_pandoc_run_py/", "platform": "", "project_url": "https://pypi.org/project/filter_pandoc_run_py/", "project_urls": { "Download": "https://github.com/caiofcm/filter_pandoc_run_py/archive/0.1.tar.gz", "Homepage": "https://github.com/caiofcm/filter_pandoc_run_py" }, "release_url": "https://pypi.org/project/filter_pandoc_run_py/0.6.2/", "requires_dist": null, "requires_python": "", "summary": "Pandoc filter to run python code blocks", "version": "0.6.2" }, "last_serial": 3651391, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "047d8fa2029b410665d58eceaa2d44a9", "sha256": "a39fe5b1149f4831756302c606b8a2ee6e185a85aa2234455789155b802d8ba8" }, "downloads": -1, "filename": "filter_pandoc_run_py-0.1.tar.gz", "has_sig": false, "md5_digest": "047d8fa2029b410665d58eceaa2d44a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4823, "upload_time": "2017-12-15T02:19:23", "url": "https://files.pythonhosted.org/packages/9a/fb/b82315fc713dd31935223bdabed229dc45f75e7544c9f0220cdfe749f61e/filter_pandoc_run_py-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "e99d834ed080ddaf8da434628aace524", "sha256": "66fb38f1d931a3e289caea8fa372850ea5012f3de3d06d4943a71cd133e13254" }, "downloads": -1, "filename": "filter_pandoc_run_py-0.2.tar.gz", "has_sig": false, "md5_digest": "e99d834ed080ddaf8da434628aace524", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5235, "upload_time": "2017-12-15T12:39:04", "url": "https://files.pythonhosted.org/packages/d5/35/adb67f6305dfaf12c026f2697f09e661daaddd4509f3fd16e134d84597fe/filter_pandoc_run_py-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "b8603d7d43797237b92b16a98a744329", "sha256": "d97d815def040cebff0172a3dcdd69b4d01dd8e97bf20731d5caab3c89844eff" }, "downloads": -1, "filename": "filter_pandoc_run_py-0.3.tar.gz", "has_sig": false, "md5_digest": "b8603d7d43797237b92b16a98a744329", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5649, "upload_time": "2017-12-15T23:22:43", "url": "https://files.pythonhosted.org/packages/26/fd/4a5bf2a5d9f65c59b418e0e5c41e5de693b92cbbeae33e5826f670dfd44c/filter_pandoc_run_py-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "fadcc6aa22c4437bfbf6972804cb48f2", "sha256": "7091967bd32e68219060230fedcc86e606e5f7b5845abf7d293f5de92c5a4bd2" }, "downloads": -1, "filename": "filter_pandoc_run_py-0.4.tar.gz", "has_sig": false, "md5_digest": "fadcc6aa22c4437bfbf6972804cb48f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5957, "upload_time": "2018-03-08T13:51:36", "url": "https://files.pythonhosted.org/packages/fc/b6/929ecfe7d0f8cd609254d5af4514d056781658e4a32a10b92a3bcfc0f860/filter_pandoc_run_py-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "ac78058a2f9bd90d51a4d110a9244d1e", "sha256": "24324ce6e8a43b41da99a7e3778763b2f0114c17417f6a9c45fb6eb733d5b145" }, "downloads": -1, "filename": "filter_pandoc_run_py-0.5.tar.gz", "has_sig": false, "md5_digest": "ac78058a2f9bd90d51a4d110a9244d1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5970, "upload_time": "2018-03-08T13:56:28", "url": "https://files.pythonhosted.org/packages/b6/e9/b4e14ba9802a95193c99fddef9d2d1fc521561d5ae666f4a1a429222363a/filter_pandoc_run_py-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "7d99bf0411b00058e7152ebef9161629", "sha256": "b658ea121a79edd1d602ec299e6a22bab521e04fd01084ae7ea035ef4c2418c1" }, "downloads": -1, "filename": "filter_pandoc_run_py-0.6.tar.gz", "has_sig": false, "md5_digest": "7d99bf0411b00058e7152ebef9161629", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6016, "upload_time": "2018-03-08T14:06:02", "url": "https://files.pythonhosted.org/packages/82/b0/097abe8018b16f1d69d6f094d9f03309c54f1afa861b2310507aafe7fbbf/filter_pandoc_run_py-0.6.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "e6ec6ab2a22c014ac6c14ff2f87be9fb", "sha256": "4bb9997b1fadfb02e323bde9557396f95b246466ecc5a235d69a52211ee80e7d" }, "downloads": -1, "filename": "filter_pandoc_run_py-0.6.1.tar.gz", "has_sig": false, "md5_digest": "e6ec6ab2a22c014ac6c14ff2f87be9fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6376, "upload_time": "2018-03-08T14:08:08", "url": "https://files.pythonhosted.org/packages/a2/8e/aeb80226241db206d622cabf0b7814ca8bcc8ad06efa908504443b8b052e/filter_pandoc_run_py-0.6.1.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "b8a46067916390b5bf33d4e0d118bd0c", "sha256": "7c28d4595ad0ed7abebfb4be85a84144c416296abe92f4aa06b9ff80665c803e" }, "downloads": -1, "filename": "filter_pandoc_run_py-0.6.2.tar.gz", "has_sig": false, "md5_digest": "b8a46067916390b5bf33d4e0d118bd0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6558, "upload_time": "2018-03-08T14:16:15", "url": "https://files.pythonhosted.org/packages/ff/f1/1d5e9a92052567ce6a48203c0ff92a310179f09f841c438ff31c228bd544/filter_pandoc_run_py-0.6.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b8a46067916390b5bf33d4e0d118bd0c", "sha256": "7c28d4595ad0ed7abebfb4be85a84144c416296abe92f4aa06b9ff80665c803e" }, "downloads": -1, "filename": "filter_pandoc_run_py-0.6.2.tar.gz", "has_sig": false, "md5_digest": "b8a46067916390b5bf33d4e0d118bd0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6558, "upload_time": "2018-03-08T14:16:15", "url": "https://files.pythonhosted.org/packages/ff/f1/1d5e9a92052567ce6a48203c0ff92a310179f09f841c438ff31c228bd544/filter_pandoc_run_py-0.6.2.tar.gz" } ] }