kafka-streams-viz icon indicating copy to clipboard operation
kafka-streams-viz copied to clipboard

How to use this tool programmatically?

Open guozhangwang opened this issue 5 years ago • 1 comments

Hey @zz85 thanks for this great tool! I've been using it for quite some time and it is definitely a big saver.

A qq for you: what should I do if I want to use this tool programmatically? Say if I want to dump a file (pdf, jpeg, whatever) from my Java code that contains the drawings of my Topology.describe() string?

guozhangwang avatar Dec 18 '18 00:12 guozhangwang

I'm also interested in toolchain ideas here. Here's what I'm planning to do to quickly be able to build png images.

  1. I have some clojure code that can spit out the topology description text syntax
  2. Using the javascript from here, I wrote a small node wrapper that reads topology description on stdin and spits out dot syntax
  3. I'm then using graphviz (via a docker container I found on docker hub) to convert the .dot graphviz text files to .png images. These aren't as nice as the rough.js ones the web app builds, but they look OK.

focusaurus avatar Jan 02 '20 22:01 focusaurus