sphinx-plantuml


Namesphinx-plantuml JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/zqmillet/sphinx-plantuml
Summaryan extension for sphinx to render plantuml in sphinx documents
upload_time2023-02-02 08:20:49
maintainer
docs_urlNone
authorkinopico
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sphinx-plantuml <img src = "./documents/statics/logo.png" height = 120 align="right">

[![sphinx-plantuml](https://img.shields.io/badge/pypi-sphinx--plantuml-brightgreen)](https://pypi.org/project/sphinx-plantuml/)
[![Documentation Status](https://readthedocs.org/projects/sphinx-plantuml/badge/?version=latest)](https://sphinx-plantuml.readthedocs.io/en/latest/?badge=latest)
![pytest](https://github.com/zqmillet/sphinx-plantuml/actions/workflows/pytest.yml/badge.svg)
![mypy](https://github.com/zqmillet/sphinx-plantuml/actions/workflows/mypy.yml/badge.svg)
![flake8](https://github.com/zqmillet/sphinx-plantuml/actions/workflows/flake8.yml/badge.svg)
![pytest](https://github.com/zqmillet/sphinx-plantuml/actions/workflows/pytest.yml/badge.svg)

## introduction

sphinx-plantuml can render PlantUML figure in your Sphinx document without any dependencies in an instant

## installation

you can install sphinx-plantuml by `pip`.

``` bash
python3 -m pip install sphinx-plantuml
```

## setup

please add `sphinxcontrib.plantuml` into your `conf.py` file.

``` python
extensions = [
    'sphinxcontrib.plantuml',
]
```

## usage

you can use the following code to insert a figure into your document.

``` rest
.. plantuml::

    @startuml
    Alice -> Bob: test
    @enduml
```

sphinx-plantuml renders the figure in `.svg` format, if you want `.png` format, you can use `:format:` argument.

``` rest
.. plantuml::
    :format: png

    @startuml
    Alice -> Bob: test
    @enduml
```

if you want add a caption, you can use `:caption:` argument.

``` rest
.. plantuml::
    :caption: this is caption

    @startuml
    Alice -> Bob: test
    @enduml
```

sphinx-plantuml directive can load PlantUML code from file.

``` rest
.. plantuml:: /the/path/of/file.uml
    :caption: this is caption
```

sphinx-plantuml directive supports almost all arguments of sphinx builtin figure directive. for example, you can use `:align:` argument to control the layout of the figure.

``` rest
.. plantuml:: /the/path/of/file.uml
    :caption: this is caption
    :align: center
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zqmillet/sphinx-plantuml",
    "name": "sphinx-plantuml",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "kinopico",
    "author_email": "zqmillet@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/0d/55/63da6497a7a9c7cae267cd9e53e1a6b1e6049a0d58b5041ee0fe3a693222/sphinx-plantuml-1.0.0.tar.gz",
    "platform": null,
    "description": "# sphinx-plantuml <img src = \"./documents/statics/logo.png\" height = 120 align=\"right\">\n\n[![sphinx-plantuml](https://img.shields.io/badge/pypi-sphinx--plantuml-brightgreen)](https://pypi.org/project/sphinx-plantuml/)\n[![Documentation Status](https://readthedocs.org/projects/sphinx-plantuml/badge/?version=latest)](https://sphinx-plantuml.readthedocs.io/en/latest/?badge=latest)\n![pytest](https://github.com/zqmillet/sphinx-plantuml/actions/workflows/pytest.yml/badge.svg)\n![mypy](https://github.com/zqmillet/sphinx-plantuml/actions/workflows/mypy.yml/badge.svg)\n![flake8](https://github.com/zqmillet/sphinx-plantuml/actions/workflows/flake8.yml/badge.svg)\n![pytest](https://github.com/zqmillet/sphinx-plantuml/actions/workflows/pytest.yml/badge.svg)\n\n## introduction\n\nsphinx-plantuml can render PlantUML figure in your Sphinx document without any dependencies in an instant\n\n## installation\n\nyou can install sphinx-plantuml by `pip`.\n\n``` bash\npython3 -m pip install sphinx-plantuml\n```\n\n## setup\n\nplease add `sphinxcontrib.plantuml` into your `conf.py` file.\n\n``` python\nextensions = [\n    'sphinxcontrib.plantuml',\n]\n```\n\n## usage\n\nyou can use the following code to insert a figure into your document.\n\n``` rest\n.. plantuml::\n\n    @startuml\n    Alice -> Bob: test\n    @enduml\n```\n\nsphinx-plantuml renders the figure in `.svg` format, if you want `.png` format, you can use `:format:` argument.\n\n``` rest\n.. plantuml::\n    :format: png\n\n    @startuml\n    Alice -> Bob: test\n    @enduml\n```\n\nif you want add a caption, you can use `:caption:` argument.\n\n``` rest\n.. plantuml::\n    :caption: this is caption\n\n    @startuml\n    Alice -> Bob: test\n    @enduml\n```\n\nsphinx-plantuml directive can load PlantUML code from file.\n\n``` rest\n.. plantuml:: /the/path/of/file.uml\n    :caption: this is caption\n```\n\nsphinx-plantuml directive supports almost all arguments of sphinx builtin figure directive. for example, you can use `:align:` argument to control the layout of the figure.\n\n``` rest\n.. plantuml:: /the/path/of/file.uml\n    :caption: this is caption\n    :align: center\n```\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "an extension for sphinx to render plantuml in sphinx documents",
    "version": "1.0.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dd9c53807726939886a18de46df3092241e475820b51c02777010b64e9c3a81e",
                "md5": "5cc959fe877ea10d54ec798ff0ebafbd",
                "sha256": "e803a567d4f069f40b0c1bade2c3fb0d669b7c8226c9ae0f77d5b9fa336634ee"
            },
            "downloads": -1,
            "filename": "sphinx_plantuml-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5cc959fe877ea10d54ec798ff0ebafbd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5137,
            "upload_time": "2023-02-02T08:20:47",
            "upload_time_iso_8601": "2023-02-02T08:20:47.881501Z",
            "url": "https://files.pythonhosted.org/packages/dd/9c/53807726939886a18de46df3092241e475820b51c02777010b64e9c3a81e/sphinx_plantuml-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d5563da6497a7a9c7cae267cd9e53e1a6b1e6049a0d58b5041ee0fe3a693222",
                "md5": "fe51a94cc12c99cd4ec84963a7d9ef0e",
                "sha256": "e17238b3c0d49c2741ba0c47ac61d2949d5e760b49126a62db40b762908f13c8"
            },
            "downloads": -1,
            "filename": "sphinx-plantuml-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "fe51a94cc12c99cd4ec84963a7d9ef0e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3773,
            "upload_time": "2023-02-02T08:20:49",
            "upload_time_iso_8601": "2023-02-02T08:20:49.710804Z",
            "url": "https://files.pythonhosted.org/packages/0d/55/63da6497a7a9c7cae267cd9e53e1a6b1e6049a0d58b5041ee0fe3a693222/sphinx-plantuml-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-02 08:20:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "zqmillet",
    "github_project": "sphinx-plantuml",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sphinx-plantuml"
}
        
Elapsed time: 0.03536s