markdown-aafigure


Namemarkdown-aafigure JSON
Version 202405.1012 PyPI version JSON
download
home_pagehttps://gitlab.com/mbarkhau/markdown_aafigure
Summaryaafigure extension for Python Markdown
upload_time2024-05-04 00:33:42
maintainerNone
docs_urlNone
authorManuel Barkhau
requires_pythonNone
licenseMIT
keywords markdown aafigure extension
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
<p align="center">
  <img alt="logo" src="https://gitlab.com/mbarkhau/markdown_aafigure/-/raw/master/logo.png">
</p>
</div>


# [Markdown aafigure][repo_ref]

This is an extension for [Python Markdown](https://python-markdown.github.io/)
which renders diagrams using [aafigure](https://aafigure.readthedocs.io/).

Project/Repo:

[![MIT License][license_img]][license_ref]
[![Supported Python Versions][pyversions_img]][pyversions_ref]
[![CalVer v202405.1012][version_img]][version_ref]
[![PyPI Version][pypi_img]][pypi_ref]
[![PyPI Downloads][downloads_img]][downloads_ref]

Code Quality/CI:

[![GitHub CI Status][github_build_img]][github_build_ref]
[![GitLab CI Status][gitlab_build_img]][gitlab_build_ref]
[![Type Checked with mypy][mypy_img]][mypy_ref]
[![Code Coverage][codecov_img]][codecov_ref]
[![Code Style: sjfmt][style_img]][style_ref]


|                 Name                |        role       |  since  | until |
|-------------------------------------|-------------------|---------|-------|
| Manuel Barkhau (mbarkhau@gmail.com) | author/maintainer | 2018-05 | -     |


*INFO*: You may want to consider using the [markdown-svgbob](https://pypi.org/project/markdown-svgbob/) extension instead of this one. svgbob has an [online editor](https://ivanceras.github.io/svgbob-editor/) and supports a wider range of shapes and diagrams. Its main disadvantage is that it "only" has builtin support for x86_64 on Windows, Linux and Mac, in contrast to aafigure which is pure python and supported everywhere.


## Install

```bash
$ pip install markdown-aafigure
$ pip install Pillow    # only if you want to render as png
```


## Use

In your markdown text you can define the block:

    ```aafigure
          +-----+   ^
          |     |   |
      --->+     +---o--->
          |     |   |
          +-----+   V
    ```

Parameters can be set for individual figures.
[Availabale parameters](https://aafigure.readthedocs.io/en/latest/sphinxext.html#options)

    ```aafigure {"foreground": "#ff0000"}
          +-----+   ^
          |     |   |
      --->+     +---o--->
          |     |   |
          +-----+   V
    ```


## Development/Testing

```bash
$ git clone https://gitlab.com/mbarkhau/markdown_aafigure
$ cd markdown_aafigure
$ make install
$ make lint mypy test
```


## MkDocs Integration

In your `mkdocs.yml` add this to markdown_extensions.

```yaml
markdown_extensions:
  - markdown_aafigure:
      tag_type: inline_svg
```

Valid options for `tag_type` are `inline_svg` (the default), `img_utf8_svg`, `img_base64_svg`, `img_base64_png`.


[repo_ref]: https://gitlab.com/mbarkhau/markdown_aafigure

[github_build_img]: https://github.com/mbarkhau/markdown-aafigure/workflows/CI/badge.svg
[github_build_ref]: https://github.com/mbarkhau/markdown-aafigure/actions?query=workflow%3ACI

[gitlab_build_img]: https://gitlab.com/mbarkhau/markdown_aafigure/badges/master/pipeline.svg
[gitlab_build_ref]: https://gitlab.com/mbarkhau/markdown_aafigure/pipelines

[codecov_img]: https://gitlab.com/mbarkhau/markdown_aafigure/badges/master/coverage.svg
[codecov_ref]: https://mbarkhau.gitlab.io/markdown_aafigure/cov

[license_img]: https://img.shields.io/badge/License-MIT-blue.svg
[license_ref]: https://gitlab.com/mbarkhau/markdown_aafigure/blob/master/LICENSE

[mypy_img]: https://img.shields.io/badge/mypy-checked-green.svg
[mypy_ref]: https://mbarkhau.gitlab.io/markdown_aafigure/mypycov

[style_img]: https://img.shields.io/badge/code%20style-%20sjfmt-f71.svg
[style_ref]: https://gitlab.com/mbarkhau/straitjacket/

[pypi_img]: https://img.shields.io/badge/PyPI-wheels-green.svg
[pypi_ref]: https://pypi.org/project/markdown_aafigure/#files

[downloads_img]: https://pepy.tech/badge/markdown-aafigure/month
[downloads_ref]: https://pepy.tech/project/markdown-aafigure

[version_img]: https://img.shields.io/static/v1.svg?label=CalVer&message=v202405.1012&color=blue
[version_ref]: https://pypi.org/project/bumpver/

[pyversions_img]: https://img.shields.io/pypi/pyversions/markdown_aafigure.svg
[pyversions_ref]: https://pypi.python.org/pypi/markdown_aafigure



# Changelog for https://gitlab.com/mbarkhau/markdown_aafigure

## v202104.1011

 - Add support for blocks with extra backticks


## v202103.1010

 - Fix related to [#14](https://gitlab.com/mbarkhau/markdown-katex/-/issues/14): Since `Markdown>=3.3` support for [Markdown in HTML][md_in_html] was broken.

[md_in_html]: https://python-markdown.github.io/extensions/md_in_html/


## v202001.0009

 - Fix: Ignore trailing whitespace after closing fence.


## v202001.0008

 - Fix: Bad image substitution when markdown has multiple diagrams


## v201907.0006

 - Fix: don't require typing package for py<35


## v201904.0005

 - Add: Support for inline svg
 - Add: `tag_type` option for better control of embedding
 - Depricated: `format` parameter


## v201904.0004

 - Add: Support of format: png extension configuration (requires Pillow)
 - Fix: Use base64 encoding for image uri


## v201904.0003

 - Fix #3: escape xml in image data uri
 - Fix: cleanup debug output
 - Change: Move to gitlab.com/mbarkhau/markdown-aafigure
 - Change: Switch to pycalver
 - Change: Project packaging updates


## 0.2.0 (2018-05-28)

 - Initial release

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/mbarkhau/markdown_aafigure",
    "name": "markdown-aafigure",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "markdown aafigure extension",
    "author": "Manuel Barkhau",
    "author_email": "mbarkhau@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a5/e0/4712ea484cf42cf7ae126d7669bcae259fa51edccb6a6b51ff5e4de63328/markdown_aafigure-202405.1012.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n<p align=\"center\">\n  <img alt=\"logo\" src=\"https://gitlab.com/mbarkhau/markdown_aafigure/-/raw/master/logo.png\">\n</p>\n</div>\n\n\n# [Markdown aafigure][repo_ref]\n\nThis is an extension for [Python Markdown](https://python-markdown.github.io/)\nwhich renders diagrams using [aafigure](https://aafigure.readthedocs.io/).\n\nProject/Repo:\n\n[![MIT License][license_img]][license_ref]\n[![Supported Python Versions][pyversions_img]][pyversions_ref]\n[![CalVer v202405.1012][version_img]][version_ref]\n[![PyPI Version][pypi_img]][pypi_ref]\n[![PyPI Downloads][downloads_img]][downloads_ref]\n\nCode Quality/CI:\n\n[![GitHub CI Status][github_build_img]][github_build_ref]\n[![GitLab CI Status][gitlab_build_img]][gitlab_build_ref]\n[![Type Checked with mypy][mypy_img]][mypy_ref]\n[![Code Coverage][codecov_img]][codecov_ref]\n[![Code Style: sjfmt][style_img]][style_ref]\n\n\n|                 Name                |        role       |  since  | until |\n|-------------------------------------|-------------------|---------|-------|\n| Manuel Barkhau (mbarkhau@gmail.com) | author/maintainer | 2018-05 | -     |\n\n\n*INFO*: You may want to consider using the [markdown-svgbob](https://pypi.org/project/markdown-svgbob/) extension instead of this one. svgbob has an [online editor](https://ivanceras.github.io/svgbob-editor/) and supports a wider range of shapes and diagrams. Its main disadvantage is that it \"only\" has builtin support for x86_64 on Windows, Linux and Mac, in contrast to aafigure which is pure python and supported everywhere.\n\n\n## Install\n\n```bash\n$ pip install markdown-aafigure\n$ pip install Pillow    # only if you want to render as png\n```\n\n\n## Use\n\nIn your markdown text you can define the block:\n\n    ```aafigure\n          +-----+   ^\n          |     |   |\n      --->+     +---o--->\n          |     |   |\n          +-----+   V\n    ```\n\nParameters can be set for individual figures.\n[Availabale parameters](https://aafigure.readthedocs.io/en/latest/sphinxext.html#options)\n\n    ```aafigure {\"foreground\": \"#ff0000\"}\n          +-----+   ^\n          |     |   |\n      --->+     +---o--->\n          |     |   |\n          +-----+   V\n    ```\n\n\n## Development/Testing\n\n```bash\n$ git clone https://gitlab.com/mbarkhau/markdown_aafigure\n$ cd markdown_aafigure\n$ make install\n$ make lint mypy test\n```\n\n\n## MkDocs Integration\n\nIn your `mkdocs.yml` add this to markdown_extensions.\n\n```yaml\nmarkdown_extensions:\n  - markdown_aafigure:\n      tag_type: inline_svg\n```\n\nValid options for `tag_type` are `inline_svg` (the default), `img_utf8_svg`, `img_base64_svg`, `img_base64_png`.\n\n\n[repo_ref]: https://gitlab.com/mbarkhau/markdown_aafigure\n\n[github_build_img]: https://github.com/mbarkhau/markdown-aafigure/workflows/CI/badge.svg\n[github_build_ref]: https://github.com/mbarkhau/markdown-aafigure/actions?query=workflow%3ACI\n\n[gitlab_build_img]: https://gitlab.com/mbarkhau/markdown_aafigure/badges/master/pipeline.svg\n[gitlab_build_ref]: https://gitlab.com/mbarkhau/markdown_aafigure/pipelines\n\n[codecov_img]: https://gitlab.com/mbarkhau/markdown_aafigure/badges/master/coverage.svg\n[codecov_ref]: https://mbarkhau.gitlab.io/markdown_aafigure/cov\n\n[license_img]: https://img.shields.io/badge/License-MIT-blue.svg\n[license_ref]: https://gitlab.com/mbarkhau/markdown_aafigure/blob/master/LICENSE\n\n[mypy_img]: https://img.shields.io/badge/mypy-checked-green.svg\n[mypy_ref]: https://mbarkhau.gitlab.io/markdown_aafigure/mypycov\n\n[style_img]: https://img.shields.io/badge/code%20style-%20sjfmt-f71.svg\n[style_ref]: https://gitlab.com/mbarkhau/straitjacket/\n\n[pypi_img]: https://img.shields.io/badge/PyPI-wheels-green.svg\n[pypi_ref]: https://pypi.org/project/markdown_aafigure/#files\n\n[downloads_img]: https://pepy.tech/badge/markdown-aafigure/month\n[downloads_ref]: https://pepy.tech/project/markdown-aafigure\n\n[version_img]: https://img.shields.io/static/v1.svg?label=CalVer&message=v202405.1012&color=blue\n[version_ref]: https://pypi.org/project/bumpver/\n\n[pyversions_img]: https://img.shields.io/pypi/pyversions/markdown_aafigure.svg\n[pyversions_ref]: https://pypi.python.org/pypi/markdown_aafigure\n\n\n\n# Changelog for https://gitlab.com/mbarkhau/markdown_aafigure\n\n## v202104.1011\n\n - Add support for blocks with extra backticks\n\n\n## v202103.1010\n\n - Fix related to [#14](https://gitlab.com/mbarkhau/markdown-katex/-/issues/14): Since `Markdown>=3.3` support for [Markdown in HTML][md_in_html] was broken.\n\n[md_in_html]: https://python-markdown.github.io/extensions/md_in_html/\n\n\n## v202001.0009\n\n - Fix: Ignore trailing whitespace after closing fence.\n\n\n## v202001.0008\n\n - Fix: Bad image substitution when markdown has multiple diagrams\n\n\n## v201907.0006\n\n - Fix: don't require typing package for py<35\n\n\n## v201904.0005\n\n - Add: Support for inline svg\n - Add: `tag_type` option for better control of embedding\n - Depricated: `format` parameter\n\n\n## v201904.0004\n\n - Add: Support of format: png extension configuration (requires Pillow)\n - Fix: Use base64 encoding for image uri\n\n\n## v201904.0003\n\n - Fix #3: escape xml in image data uri\n - Fix: cleanup debug output\n - Change: Move to gitlab.com/mbarkhau/markdown-aafigure\n - Change: Switch to pycalver\n - Change: Project packaging updates\n\n\n## 0.2.0 (2018-05-28)\n\n - Initial release\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "aafigure extension for Python Markdown",
    "version": "202405.1012",
    "project_urls": {
        "Homepage": "https://gitlab.com/mbarkhau/markdown_aafigure"
    },
    "split_keywords": [
        "markdown",
        "aafigure",
        "extension"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "034afa27603f563d3e2217243a01cca812fb95e3bdca86921e8ea455cde11386",
                "md5": "44bdf930fe38364bb8110389c226f7a9",
                "sha256": "136491376f258c7ba5f798e20d28d050241139acb2b773c40447ff18b8b1cc96"
            },
            "downloads": -1,
            "filename": "markdown_aafigure-202405.1012-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "44bdf930fe38364bb8110389c226f7a9",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 8421,
            "upload_time": "2024-05-04T00:33:40",
            "upload_time_iso_8601": "2024-05-04T00:33:40.836590Z",
            "url": "https://files.pythonhosted.org/packages/03/4a/fa27603f563d3e2217243a01cca812fb95e3bdca86921e8ea455cde11386/markdown_aafigure-202405.1012-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5e04712ea484cf42cf7ae126d7669bcae259fa51edccb6a6b51ff5e4de63328",
                "md5": "e526bd6addd13b55b6444e6334e1fc9a",
                "sha256": "d89488d60d6c82abc151f35fe027949ef547fcb5e41d8be5376ad6b5ebea876e"
            },
            "downloads": -1,
            "filename": "markdown_aafigure-202405.1012.tar.gz",
            "has_sig": false,
            "md5_digest": "e526bd6addd13b55b6444e6334e1fc9a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13696,
            "upload_time": "2024-05-04T00:33:42",
            "upload_time_iso_8601": "2024-05-04T00:33:42.802583Z",
            "url": "https://files.pythonhosted.org/packages/a5/e0/4712ea484cf42cf7ae126d7669bcae259fa51edccb6a6b51ff5e4de63328/markdown_aafigure-202405.1012.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-04 00:33:42",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "mbarkhau",
    "gitlab_project": "markdown_aafigure",
    "lcname": "markdown-aafigure"
}
        
Elapsed time: 0.26080s