{ "info": { "author": "Pedro H.", "author_email": "5179251+pedrohdz@users.noreply.github.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Documentation" ], "description": ".. COMMENT_OUT\n\n|Code Climate| |Build Status| |codecov| |PyPI version|\n\n###############################################################################\nmuextensions\n###############################################################################\n\n.. contents:: Table of contents\n\n\nOverview\n===============================================================================\n*This project is still in alpha. Expect backwards compatibility breaking\nchanges.*\n\nAdds `ditaa`_ and `PlantUML`_ directives to `reStructuredText`_, and hopefully\n`Markdown`_ in the future. *muextensions* does this by providing plugins for\nprojects like `Hovercraft! `_ and `Pelican`_, and simplifies\nregistering the directives with other `Docutils`_ projects.\n\nIt allows for adding a *reStructuredText* block like the following:\n\n.. code:: rst\n\n .. ditaa-image::\n\n +---------------+ /---------------------+\n | +-----------+ | +------------+ |+---+ +----+ /---+|\n | | ..dita:: | +--->+muextensions+--->+| +->+{io}+-> + ||\n | | ~~~~~~~ | | | {io}| ||{d}| +----+ | ||\n | | ~~~~~~~ | | +------------+ |+---+ +---/|\n | +-----------+ | | |\n | {d}| | |\n +---------------+ +---------------------/\n\nAnd having it embedded in the `Docutils`_ generated document as an image:\n\n.. image:: https://raw.githubusercontent.com/pedrohdz/muextensions/master/docs/images/simple-ditaa-example.svg\n :alt: Simple ditaa example\n :align: center\n\n\nIn the case of *PlantUML*, a block like:\n\n.. code:: rst\n\n .. plantuml-image::\n\n skinparam monochrome true\n skinparam shadowing false\n\n client -> front_end\n front_end -> back_end\n back_end -> front_end\n front_end -> client\n\nWould be rendered as:\n\n.. image:: https://raw.githubusercontent.com/pedrohdz/muextensions/master/docs/images/simple-plantuml-example.svg\n :alt: Simple PlantUML example\n :align: center\n\n\nUsage\n===============================================================================\n\nPrerequisites\n-------------\n\nInstall `PlantUML`_ and have a wrapper script with the name ``plantuml`` that\nexecutes it installed in your path for *PlantUML* support. A sample wrapper\nscript is included in `contrib/scripts/plantuml `_ of this\nproject.\n\nFor `ditaa`_ support, install as described in the `Getting it `_\nsection of the *ditaa* documentation.\n\n.. _get_ditaa: https://github.com/stathissideris/ditaa#getting-it\n.. _plantuml_wrapper: contrib/scripts/plantuml\n\n\nPelican\n-------\n\n*muextensions* provides a plugin for `Pelican`_ in\n``muextensions.contrib.pelican``.\n\nIf everything is configured correctly, integrating *muextensions* into\n*Pelican* should be as simple as:\n\n1. Installing *muextensions* in the Python virtual environment that *Pelican*\n is installed in with:\n\n .. code:: bash\n\n pip install muextensions\n\n2. Appending ``'muextensions.contrib.pelican'`` to ``PLUGINS`` in your\n ``pelicanconf.py``:\n\n .. code:: python\n\n PLUGINS = ['muextensions.contrib.pelican',]\n\nFor more information on how to configure plugins in *Pelican*, refer to the\n`How to use plugins `_ section in their documentation.\n\n.. _pelican_plugins: http://docs.getpelican.com/en/stable/plugins.html\n\n\nHovercraft!\n-----------\n\nSupport for `Hovercraft! `_ is currently pending pull request\n`regebro/hovercraft#196 `_\nwhich adds the ``--directive-plugin`` argument to the ``hovercraft`` command.\nThe source code introducing ``--directive-plugin`` can be found in\n`pedrohdz/hovercraft `_ under the ``directives`` branch.\n\nHere is a quick example to see *muextensions*, make sure to complete the\n`Prerequisites`_ first. We will utilize the demo presentation in\n`docs/examples/hovercraft/ `_.\n\n.. code:: bash\n\n cd docs/examples/hovercraft/\n python3.7 -m venv .venv\n source .venv/bin/activate\n pip install -U pip\n pip install muextensions \\\n https://github.com/pedrohdz/hovercraft/archive/directives.zip\n hovercraft --directive-plugin muextensions.contrib.hovercraft demo.rst\n\nOpen http://localhost:8000/ in a web browser to see the *Hovercraft!*\npresentation.\n\n.. _Hovercraft: https://hovercraft.readthedocs.io/en/latest/\n.. _PATCHED: https://github.com/pedrohdz/hovercraft/tree/directives\n\n\nOther docutils projects\n-----------------------\n\nThe *muextensions* *reStructuredText* directives can be added to any\n`Docutils`_ project by way of *Docutils* *connectors* in\n``muextensions.connector.docutils``.\n\n.. code:: python\n\n from pathlib import Path\n from muextensions.connector.docutils import plantuml, ditaa\n\n output_path = Path('.')\n plantuml.register(output_path)\n ditaa.register(output_path)\n\nThe ``plantuml`` and ``ditaa`` ``register()`` functions in\n``muextensions.connector.docutils`` handle registering the *reStructuredText*\ndirectives as described in the `Register the Directive `_\nsection on the *Docutils* of the documentation.\n\n.. _docutils_register: http://docutils.sourceforge.net/docs/howto/rst-directives.html#register-the-directive\n\n.. _Docutils: http://docutils.sourceforge.net/index.html\n\n\nDevelopment\n===============================================================================\n\nSetting up for development:\n\n.. code:: bash\n\n git clone git@github.com:pedrohdz/muextensions.git\n cd muextensions\n python3.5 -m venv .venv\n source .venv/bin/activate\n pip install -U pip\n pip install -e .[ci,test]\n\n\nMake sure you have a good baseline by running ``tox``. Executing ``tox`` from\nwithin a *venv* (Python virtual environments) will cause ``pip`` related errors\nduring the tests, either exit the *venv* via the ``deactivate`` command, or\nexecute ``tox`` from a new terminal.\n\n.. code:: bash\n\n deactivate\n tox\n source .venv/bin/activate\n\nTo execute the unit tests:\n\n.. code:: bash\n\n pytest\n\nTo execute and view the unit test code coverage:\n\n.. code:: bash\n\n pytest --cov-report=html --cov\n open htmlcov/index.html\n\nTo run the integration tests, assuming both ``ditaa`` and ``plantuml`` are\ninstalled on the system, use the ``--run-integration`` option. To save the\noutput of the integration tests for examination, add the\n``--save-integration-output-to`` option:\n\n.. code:: bash\n\n pytest --run-integration\n pytest --run-integration --save-integration-output-to=./tmp\n\n\nContribution\n------------\n\nWhen contributing, please keep in mind the following before submitting the pull\nrequest:\n\n- Make sure that the ``tox`` checks complete without failure.\n- When making code changes, add relevant unit tests.\n- If fixing a bug, please try and add a regression test. It should fail before\n the fix is applies, and pas after.\n- This project conforms to `Semantic Versioning 2.0.0 `_.\n\n.. _semver: https://semver.org/\n\n\nAppendix\n===============================================================================\n\nTodo list\n---------\n\n- [X] Add Pelican support.\n- [X] Add Ditaa support.\n- [-] Spread the word:\n\n - [-] Try and get it listed in `getpelican/pelican-plugins\n `_\n (`getpelican/pelican-plugins#1165\n `_).\n - [-] Try and get it listed in `stathissideris/ditaa\n `_ (`stathissideris/ditaa#55\n `_).\n\n- [-] Finish adding plugin support to Hovercraft! (`regebro/hovercraft#196\n `_).\n- [ ] Add GitHub tickets for each of the following.\n- [ ] Add caching.\n- [ ] Add a ``plantuml-text`` directive. This should generate and embed ASCII\n art by way of ``plantuml -ttxt``.\n- [ ] Add a ``ditaa-text`` directive. This should embed ASCII art in the\n directive contents directly as a ``code`` block.\n- [ ] Add ``ditaa-figure`` and ``plantuml-figure`` directives the inherit from\n `figure\n `_.\n- [ ] Add REST callers for execs to speed things up even more.\n- [ ] Finish removing the deprecated `uml` directive.\n- [ ] Look into https://pypi.org/project/pbr/\n- [ ] Add Markdown support.\n\n\nReferences\n----------\n\n- *TODO*\n\n\n.. _reStructuredText: http://docutils.sourceforge.net/rst.html\n.. _ditaa: https://github.com/stathissideris/ditaa\n.. _PlantUML: http://plantuml.com/\n.. _Markdown: https://daringfireball.net/projects/markdown/\n.. _Hovercraft: https://hovercraft.readthedocs.io/en/latest/\n.. _Pelican: http://docs.getpelican.com/en/stable/\n\n.. _hovercraft_pr_196: https://github.com/regebro/hovercraft/pull/196\n\n.. |Code Climate| image:: https://codeclimate.com/github/codeclimate/codeclimate/badges/gpa.svg\n :target: https://codeclimate.com/github/pedrohdz/muextensions\n.. |Build Status| image:: https://travis-ci.org/pedrohdz/muextensions.svg?branch=master\n :target: https://travis-ci.org/pedrohdz/muextensions\n.. |codecov| image:: https://codecov.io/gh/pedrohdz/muextensions/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/pedrohdz/muextensions\n.. |PyPI version| image:: https://badge.fury.io/py/muextensions.svg\n :target: https://badge.fury.io/py/muextensions", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pedrohdz/muextensions", "keywords": "pelican hovercraft plantuml uml docutils", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "muextensions", "package_url": "https://pypi.org/project/muextensions/", "platform": "", "project_url": "https://pypi.org/project/muextensions/", "project_urls": { "Homepage": "https://github.com/pedrohdz/muextensions" }, "release_url": "https://pypi.org/project/muextensions/0.0.18/", "requires_dist": null, "requires_python": "", "summary": "Markup extentions", "version": "0.0.18" }, "last_serial": 5727317, "releases": { "0.0.12": [ { "comment_text": "", "digests": { "md5": "b59eb09288a5b6ba1db184b71b3fee61", "sha256": "fb9d243e89e63cd2624654ae6e078e307ce139bcfe85900b20af7ae25e65e05d" }, "downloads": -1, "filename": "muextensions-0.0.12.tar.gz", "has_sig": false, "md5_digest": "b59eb09288a5b6ba1db184b71b3fee61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5451, "upload_time": "2019-08-04T12:14:08", "url": "https://files.pythonhosted.org/packages/69/9e/05efe48ea254589b9bdc5f1355a6455dda15b11579461ce73d2df64c5ebf/muextensions-0.0.12.tar.gz" } ], "0.0.13": [ { "comment_text": "", "digests": { "md5": "ee188fb84166922270c31db1a74f0b8f", "sha256": "7e8ebb9fa1fdae875805c9d57aaf8b906575316cc5f5f70454f52e698a8429d9" }, "downloads": -1, "filename": "muextensions-0.0.13.tar.gz", "has_sig": false, "md5_digest": "ee188fb84166922270c31db1a74f0b8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6116, "upload_time": "2019-08-08T17:16:55", "url": "https://files.pythonhosted.org/packages/53/30/07c258a74d1bdf4bbc16d748214447d45433fc88a8bf3cf4defb11dfbe4e/muextensions-0.0.13.tar.gz" } ], "0.0.17": [ { "comment_text": "", "digests": { "md5": "1f0d4e87b8e4943f38a7569316ba1bed", "sha256": "58eb7d5e39d5714b9816945e0b603fa7fe661ff101b2082d3077407b6dc5fa19" }, "downloads": -1, "filename": "muextensions-0.0.17.tar.gz", "has_sig": false, "md5_digest": "1f0d4e87b8e4943f38a7569316ba1bed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13742, "upload_time": "2019-08-25T14:49:46", "url": "https://files.pythonhosted.org/packages/fc/ce/598a39b799b420cdb0c229e9dcf894e7c25e2b593d66fc621fe4ea0d9480/muextensions-0.0.17.tar.gz" } ], "0.0.18": [ { "comment_text": "", "digests": { "md5": "e48fa2bb2d139672ca6ef3932d397bce", "sha256": "3dd6757e63b04d3e43ac15d52fda7667aaf83144b1aa5ffc2f98b45b9652c6c4" }, "downloads": -1, "filename": "muextensions-0.0.18.tar.gz", "has_sig": false, "md5_digest": "e48fa2bb2d139672ca6ef3932d397bce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13790, "upload_time": "2019-08-25T15:20:40", "url": "https://files.pythonhosted.org/packages/be/3c/378696a62418a87e0de940cfcc0b75ae57bb9121807d2646180667f21978/muextensions-0.0.18.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e48fa2bb2d139672ca6ef3932d397bce", "sha256": "3dd6757e63b04d3e43ac15d52fda7667aaf83144b1aa5ffc2f98b45b9652c6c4" }, "downloads": -1, "filename": "muextensions-0.0.18.tar.gz", "has_sig": false, "md5_digest": "e48fa2bb2d139672ca6ef3932d397bce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13790, "upload_time": "2019-08-25T15:20:40", "url": "https://files.pythonhosted.org/packages/be/3c/378696a62418a87e0de940cfcc0b75ae57bb9121807d2646180667f21978/muextensions-0.0.18.tar.gz" } ] }