Note: Forked to fix errors with latest version of Python-Markdown and migrate to using Poetry.
Markdown Inline Graphviz (for Python 3)
This is just a continuation of the great job of Steffen Prince in sprin/markdown-inline-graphviz, in order to get it work with pip3. If you use python 2, please use the original extension instead.
A Python Markdown extension that replaces inline Graphviz definitions with inline SVGs or PNGs!
Why render the graphs inline? No configuration! Works with any Python-Markdown-based static site generator, suche originas MkDocs, Pelican, and Nikola out of the box without configuring an output directory.
Installation
$ pip3 install markdown_inline_graphviz_extension --user
Usage
Activate the markdown_inline_graphviz extension. For example, with Mkdocs, you add a
stanza to mkdocs.yml:
markdown_extensions:
- markdown_inline_graphviz
To use it in your Markdown doc, with SVG output:
```graphviz dot attack_plan.svg
digraph G {
rankdir=LR
Earth [peripheries=2]
Mars
Earth -> Mars
}
```
or with PNG:
```graphviz dot attack_plan.png
digraph G {
rankdir=LR
Earth [peripheries=2]
Mars
Earth -> Mars
}
```
Alternatively you can still using {% legacy notation but its not recommended.
{% dot attack_plan.svg
digraph G {
rankdir=LR
Earth [peripheries=2]
Mars
Earth -> Mars
}
%}
Supported graphviz commands: dot, neato, fdp, sfdp, twopi, circo.
Credits
Inspired by jawher/markdown-dot, which renders the dot graph to a file instead of inline.
Forked from sprin/markdown-inline-graphviz
License
Release files for python3-markdown-extension-graphviz 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python3-markdown-extension-graphviz-0.1.0.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python3_markdown_extension_graphviz-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:9.1 kB
Release files / python3-markdown-extension-graphviz-0.1.0.tar.gz
| Download URL | python3-markdown-extension-graphviz-0.1.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8542547e100cba00423e0173e6353904360ce471a580367d6219cf75c0c36ae7
|
|
BLAKE2b-256 checksum How to use checksums |
a9ae53c071855108d57a91b4f94283f1d18b3c49a61757fbb9f9f2b5bd5e13fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.7 Linux/5.18.19_1
|
Release files / python3_markdown_extension_graphviz-0.1.0-py3-none-any.whl
| Download URL | python3_markdown_extension_graphviz-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7de1ecf8ecab72caf2ce6d3cbcf07ac574bbad74d56643d3566779acfdd112b
|
|
BLAKE2b-256 checksum How to use checksums |
89a9c109863f52ab552c20b24936b417ff92158d64ae287264e9beac6a793631
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.7 Linux/5.18.19_1
|