Open bencooper222 opened 1 year ago
(I'd be willing to work on this if there was some guarantee a good implementation would be accepted)
Hey @bencooper222 !
Thanks for the proposal! We'd be happy to accept this enhancement. I think the UX you laid-out makes sense: add a --format
flag that defaults to dot
.
A note for the community
Use Cases
MermaidJS graphing is natively supported by GitHub. Ex:
It doesn't support the same syntax as graphviz unfortunately (see https://github.com/mermaid-js/mermaid/issues/5). Seeing as GitHub is a major place where these graphs are useful (i.e. in READMEs for documentation),
vector graph
should get a flag to specify output format.Attempted Solutions
I wrote a basic remapping between DOT and MermaidJS's language:
That's not perfect (it doesn't capture the shapes of each node) but it's pretty good for 5 minutes of effort and I think shows that adding this feature wouldn't be super hard.
Proposal
vector graph
-> outputs in DOTvector graph --format DOT
-> output in DOTvector graph --format mermaid
-> outputs in mermaidvector graph --format not-real-format
-> exit with errorReferences
No response
Version
vector 0.20.1 (aarch64-unknown-linux-gnu 38b806e 2022-04-07)