Cli for Sequence Diagram
Apr 8, 2019 homepageI like the sequence tool bramp/js-sequence-diagrams which convert code to pretty diagrams.
However the js-sequence-diagrams only works on browser, so I wrapped it with puppeteer as a command-line tool: seq-cli.
The idea is simple:
- Read seq code from file
- Render seq code to html file with mustache
- Load html file in puppeteer
- Render seq code to svg with js-sequence-diagrams in puppeteer
- Save svg to file
That's it.
You can install seq-cli from npm and try it:
$ npm install seq-cli
$ cat <<EOF >hello.seq
A -> B: Hey!
Note Over A: this is a note
C -> D: How are you
D --> E: Good day
E ->> F: HAHA
EOF
$ seq-cli -i hello.seq