/kino_kroki

A Livebook smart-cell to render diagrams powered by Kroki.io

Primary LanguageElixirMIT LicenseMIT

KinoKroki

Package Version

A Livebook smart-cell to render diagrams powered by Kroki.

Livebook badge

Installation

Add it as a dependency in your notebook with:

Mix.install([:kino_kroki])

Usage

Paste the diagram source in the editor and select the diagram type.

sample

You may also render from a variable with:

graph = """
digraph G { bgcolor="purple:pink" label="agraph" fontcolor="white"
fontname="Helvetica,Arial,sans-serif"
node [fontname="Helvetica,Arial,sans-serif"]
edge [fontname="Helvetica,Arial,sans-serif"]
  subgraph cluster1 {fillcolor="blue:cyan" label="acluster" fontcolor="white" style="filled" gradientangle="270"
        node [shape=box fillcolor="red:yellow" style="filled" gradientangle=90]
        anode;
    }

}

Kino.Kroki.new(graph, :graphviz)

License

Copyright (c) 2022 Dimitris Zorbas, MIT License. See LICENSE.txt for further details.