Reputation: 1026
Is there a tool that generates ASCII diagrams from some sort of mark up.
Use case: to be able to quickly create and edit diagrams that are embeddable into javadoc (or any other comments).
Something along the lines of allowing us to write some mark up:
A--HAS-->B
B--HAS-->C
And the tool would generate a visualization:
+----+ +-----+
| A |-----HAS-----| B |
+----+ +-----+
|
| HAS
|
+--|---+
| C |
| |
+------+
Without having to draw it in a tool such as https://textik.com/
Upvotes: 3
Views: 1056
Reputation: 4100
Take a look at Graph::Easy http://bloodgate.com/perl/graph/manual/index.html . It has a syntax very similar to dot from the GraphViz package, and can even take as input some dot files. It also accepts input in its own very simple syntax, and can provide output in a number of formats including ASCII but also graphical formats.
Upvotes: 0
Reputation: 8065
The ADia project aims to render ASCII diagrams using a human-readable language:
diagram: Foo
sequence:
foo -> bar: Hello World!
Output
DIAGRAM: Foo
+-----+ +-----+
| foo | | bar |
+-----+ +-----+
| |
|~~~Hello World!~~~>|
| |
|<------------------|
| |
+-----+ +-----+
| foo | | bar |
+-----+ +-----+
Read the documentation or Try the live demo page at github.io
.
Upvotes: 1