Using Livebook and Kino to repeatedly render an image

I figured I could use livebook to generate some sequence diagrams via plantuml.
The idea is that I have sequence diagram specification in another editor open and livebook repeatedly runs plantuml ... command and displays the resulting .svg file.

However, I am not sure how to do that.
I can either display a static picture once with Kino.Image.new
Or I can display an updating chart with Kino.VegaLite.periodically(widget, ...) but I can’t see how I can put a picture in the widget. Only graphs.

How can I make livebook display refreshed picture?

3 Likes

Another quick and dirty solution might be to fork a branch on LiveBook and run a for loop that IO.inspects each Kino.Image struct.

I suggest forking so you can continue using your livebook