Render inline graphs with Markdown and Graphviz (python3 version)
Project description
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
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file markdown_inline_graphviz_extension-1.1.3.tar.gz.
File metadata
- Download URL: markdown_inline_graphviz_extension-1.1.3.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
215b74334cfa1316bb6afa6f0a1f9b3dd5a9c18de2c29d39793e09ab067aeec7
|
|
| MD5 |
da8e7d6b46d724d80822ef49a7673c3e
|
|
| BLAKE2b-256 |
cc15fd9c1fc72ddc82833b2e5f9de0123fa8f60b72500c2d39ddb065881fad5b
|
File details
Details for the file markdown_inline_graphviz_extension-1.1.3-py3-none-any.whl.
File metadata
- Download URL: markdown_inline_graphviz_extension-1.1.3-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
661b7bb42e23bf808cd4c137e2d0c7f2ee788fe87104e282a4d3a818a56a55b5
|
|
| MD5 |
9b36a0f8d699b31e43decf72b410d13f
|
|
| BLAKE2b-256 |
5e2889528059ae272924030d86368c9cc78b1fb6ef3d50ca7b9d225abe22f3cd
|