Skip to main content

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

MIT 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

markdown_inline_graphviz_extension-1.1.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file markdown_inline_graphviz_extension-1.1.3.tar.gz.

File metadata

File hashes

Hashes for markdown_inline_graphviz_extension-1.1.3.tar.gz
Algorithm Hash digest
SHA256 215b74334cfa1316bb6afa6f0a1f9b3dd5a9c18de2c29d39793e09ab067aeec7
MD5 da8e7d6b46d724d80822ef49a7673c3e
BLAKE2b-256 cc15fd9c1fc72ddc82833b2e5f9de0123fa8f60b72500c2d39ddb065881fad5b

See more details on using hashes here.

File details

Details for the file markdown_inline_graphviz_extension-1.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for markdown_inline_graphviz_extension-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 661b7bb42e23bf808cd4c137e2d0c7f2ee788fe87104e282a4d3a818a56a55b5
MD5 9b36a0f8d699b31e43decf72b410d13f
BLAKE2b-256 5e2889528059ae272924030d86368c9cc78b1fb6ef3d50ca7b9d225abe22f3cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page