No project description provided
Project description
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
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
File details
Details for the file python3-markdown-extension-graphviz-0.1.0.tar.gz
.
File metadata
- Download URL: python3-markdown-extension-graphviz-0.1.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.7 Linux/5.18.19_1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8542547e100cba00423e0173e6353904360ce471a580367d6219cf75c0c36ae7 |
|
MD5 | 40ed855823488a68c46533f1bf340164 |
|
BLAKE2b-256 | a9ae53c071855108d57a91b4f94283f1d18b3c49a61757fbb9f9f2b5bd5e13fb |
File details
Details for the file python3_markdown_extension_graphviz-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: python3_markdown_extension_graphviz-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.7 Linux/5.18.19_1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7de1ecf8ecab72caf2ce6d3cbcf07ac574bbad74d56643d3566779acfdd112b |
|
MD5 | 5bd4a7a4cf6c31486ffadfe27e2c3440 |
|
BLAKE2b-256 | 89a9c109863f52ab552c20b24936b417ff92158d64ae287264e9beac6a793631 |