Finance and industry must be socialized somehow.
-- Henry Laurence Gantt
henry is a declarative generator of task dependency graphs and gantt charts.
The following libraries have been used:
- weavejester/dependency - to manipulate graphs
- macroz/tangle - to visualize dependency graphs (png)
- metasoarous/oz - to visualize gantt charts (png/html)
- applied-science/darkstar - to visualize gantt charts (svg)
- stathisideris/dali - to rasterize images (svg to png)
Add the project to your deps.edn file:
{:deps [henry {:git/url "https://github.com/PavlosMelissinos/henry.git"
:sha ???}]}
{:description "Project X roadmap"
:tasks [{:id :a :duration 2 :styles [:critical]}
{:id :b :duration 1 :styles [:critical]}
{:id :c :duration 3 :styles [:major]}
{:id :d :duration 3 :styles [:trivial]}
{:id :e :duration 2 :styles [:major]}
{:id :f :duration 3 :styles [:trivial]}]
:dependencies [[:b :a] [:c :b] [:c :a] [:d :c] [:f :e]]
:styles {:critical {:fillcolor "#FF0000" :style "filled"}
:major {:fillcolor "#FFFF00" :style "filled"}
:trivial {:fillcolor "#00FF00" :style "filled"}}}
(ns example.core
(:require [henry.core :as henry]))
;; Load the spec
(def spec (henry/load-edn "test_resources/data.edn"))
;; Given a spec, translate to dot syntax
(def deps (henry/convert spec :deps :dot))
;; Given a spec, generate a png using graphviz
(henry/export spec :deps :png "test_resources/data.deps.png")
Results in:
(ns example.core
(:require [henry.core :as henry]))
;; Load the spec
(def spec (henry/load-edn "test_resources/data.edn"))
;; Given a spec, translate to vega-lite (json)
(henry/convert spec :gantt :json)
;; Given a spec, export to svg file
(henry/export spec :gantt :svg "test_resources/data.gantt.svg")
Results in: