{"id":20626438,"url":"https://github.com/chgeuer/ex_dot","last_synced_at":"2026-04-19T12:39:40.059Z","repository":{"id":223564347,"uuid":"760901452","full_name":"chgeuer/ex_dot","owner":"chgeuer","description":"A little Elixir package to convert DOT language into SVG","archived":false,"fork":false,"pushed_at":"2024-03-04T20:29:14.000Z","size":44,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T11:02:24.605Z","etag":null,"topics":["elixir-lang","graphviz-dot","graphviz-dot-language","livebook","rustler","rustler-precompiled","svg"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chgeuer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-20T21:42:58.000Z","updated_at":"2024-02-29T21:07:01.000Z","dependencies_parsed_at":"2024-03-03T22:22:47.470Z","dependency_job_id":"387f7aea-81d7-4fbe-b4bd-c8036f305f18","html_url":"https://github.com/chgeuer/ex_dot","commit_stats":null,"previous_names":["chgeuer/ex_dot_rust","chgeuer/ex_dot"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chgeuer%2Fex_dot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chgeuer%2Fex_dot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chgeuer%2Fex_dot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chgeuer%2Fex_dot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chgeuer","download_url":"https://codeload.github.com/chgeuer/ex_dot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242483346,"owners_count":20135784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir-lang","graphviz-dot","graphviz-dot-language","livebook","rustler","rustler-precompiled","svg"],"created_at":"2024-11-16T13:13:15.684Z","updated_at":"2026-04-19T12:39:39.996Z","avatar_url":"https://github.com/chgeuer.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dot for Elixir\n\n\u003e **This library renders graphs in [DOT Language](https://graphviz.org/doc/info/lang.html) to SVG.**\n\nIt is a tiny ([Rustler](https://github.com/rusterlium/rustler)-based) wrapper around the [`layout-rs`](https://crates.io/crates/layout-rs). I initially used a local copy of `dot.exe` from the [Graphviz](https://graphviz.org/) package, and launched `dot` using [rambo](https://github.com/jayjun/rambo). However, I didn't want to spin up a console executable for each conversion, so looked for alternatives. Luckily, I found [`nadavrot/layout`](ttps://github.com/nadavrot/layout), which seems to do what I wanted. *I haven't checked whether that Rust crate can do *everything* that the full dot executable can do.*\n\nTry this [demo](livebook://github.com/chgeuer/ex_dot/blob/main/demo.livemd).\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `ex_dot` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    #{:ex_dot, github: \"chgeuer/ex_dot\"} # If you do this, you must set the environment variable EX_DOT_BUILD=true\n    {:ex_dot, \"~\u003e 0.1.0\"}\n  ]\nend\n```\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) and published on [HexDocs](https://hexdocs.pm). Once published, the docs can be found at \u003chttps://hexdocs.pm/ex_dot\u003e.\n\n## Local build \n\nYou must set the environment variable `EX_DOT_BUILD` to `true`, otherwise it will try to pull the [`rustler_precompiled`](https://github.com/philss/rustler_precompiled) bits.\n\n## Using it in LiveBook\n\n```elixir\nMix.install([\n  {:libgraph, \"~\u003e 0.16.0\"},\n  {:kino, \"~\u003e 0.12.3\"},\n  {:ex_dot, \"~\u003e 0.1.0\"}\n])\n\n\"\"\"\ndigraph R {\n  node [shape=record];\n\n  { rank=same rA sA tA }\n  { rank=same uB vB wB }\n\n\n   rA -\u003e sA;\n   sA -\u003e vB;\n   t  -\u003e rA;\n   uB -\u003e vB;\n   wB -\u003e u;\n   wB -\u003e tA;\n}\n\"\"\"\n|\u003e Dot.to_svg()\n|\u003e Kino.Image.new(:svg)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchgeuer%2Fex_dot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchgeuer%2Fex_dot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchgeuer%2Fex_dot/lists"}