Show HN: Dot-to-ASCII – Graphviz to ASCII Converter
dot-to-ascii.ggerganov.com
dot-to-ascii.ggerganov.com
Instead of this:
+ - - - +
' HELLO '
+ - - - +
Do this: ┌───────┐
│ HELLO │
└───────┘
There are so many characters available for this, that it would be possible to draw totally awesome diagrams in just text:Definitely looks better. Might look into fixing the corners and arrows as well before merging in master.
Just replace `--as_ascii` with `--as=boxart`[1]
1. https://metacpan.org/pod/distribution/Graph-Easy/bin/graph-e...
I just made this the default display, with an option to toggle back to "--as_ascii".
edit: sending the graph info via GET is a bit risky though, browsers and servers tend to limit URL size so you might get truncation on the bigger graphs (IIRC IE is the biggest issue with ~1k URLs, not sure if pre-chrome Edge is better or the same, then it's mostly webservers which generally have an 8k default limit on the request-line).
edit: missed "used"
Anyway good job, it certainly maximises usefulness for the complexity. Especially good call on using the codemirror editor, I'd have not thought of it but it makes the thing much nicer to use.
One thing though, it doesn't handle errors that nicely, e.g. for input "a" it outputs "null". Nitpicking aside, it's neat.
Edit: I wonder what sort of heuristics graph-easy is using behind the scenes to decide where to place the clusters, etc., and how it can tell whether a particular input is feasible or not.
You can fork it on gitlab, https://gitlab.com/graphviz/graphviz.gitlab.io
digraph "CK-Build" {
subgraph rank_0 {
rank=0;
"a";
}
subgraph rank_1 {
rank=1;
"b" -> "a";
}
}
On regular rendering, this does not render a box for the subgraph, plus, a and b are displayed in the same box, at least it should be in separated boxes. subgraph cluster_0 {
a0 -> a1 -> a2 -> a1;
label = "process #1";
}