aafigure extension for Python Markdown
Project description
Markdown aafigure
This is an extension for Python Markdown which renders diagrams using aafigure.
Project/Repo:
Code Quality/CI:
Name | role | since | until |
---|---|---|---|
Manuel Barkhau (mbarkhau@gmail.com) | author/maintainer | 2018-05 | - |
INFO: You may want to consider using the markdown-svgbob extension instead of this one. svgbob has an online 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
$ 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
```aafigure {"foreground": "#ff0000"}
+-----+ ^
| | |
--->+ +---o--->
| | |
+-----+ V
```
Development/Testing
$ 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.
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
.
Changelog for https://gitlab.com/mbarkhau/markdown_aafigure
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for markdown_aafigure-201907.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4452aa83ff9f23829e22febf6da4ae480e2431d80875a5ddf8b2210f112ab1a3 |
|
MD5 | 68f46481e30d5c26cbd95da5e80b6edc |
|
BLAKE2b-256 | cc2681681169cfa19b4797a0a435f97e01878b6cae4c47577e8f536475f73d59 |
Hashes for markdown_aafigure-201907.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a9cd254035cfc964daaf13e466bb0a5549e595a96042b3c5b46734a6d84710b |
|
MD5 | 2d32931043a6fad385555d951d88e642 |
|
BLAKE2b-256 | 0b2985454b79e45bbf3353dfd9b84ac4ac3a26cef26eb81968d8ddbc89550300 |