Don’t recall any general-purpose dot (DOT Language | Graphviz) translators or style-sheet systems.
But you can create dot filues using python, C, java, … interfaces and gvpr .
For that matter, dot is a text-based language, so nearly any programming language can easily produce it.
There are outstanding requests for a style-sheet addition, but to my knowledge no one is working on it. Some folks use M4 or cpp as pre-processors.
Note that you might not need an HTML-node to create text above & below a line, depending upon your specific formatting needs.
graph tlt {
rankdir=LR
a[label="1 text\n____\nmore text"]
b[label="2 text\n------\nmore text"]
c[label=<<U>3 text</U><BR/>more text>]
d[label=<4 text<BR/>---------<br/>more text>]
/* or create labels elsewhere and insert as images */
}
The node_descs: key automatically inserts newlines according to the newlines in the string; and there is some styling support.
The generated dot file is in the second tab, but styles are generated on the page so you need tailwind plus some other processing to get the colors.
Otherwise, the generated svg is copied to clipboard when you click the second button from the top right when hovering over the diagram, which contains the styles inlined into the svg.
digraph pre{
a [_type=process label="{1. Process\l | Something}"]
b [_type=process label="{2. Process\l | Something else}"]
c [_type=subprocess label="do it"]
d [_type=database label="lots of data"]
e [_type=database label="a bit of data"]
f [_type=inputoutput label="inOut"]
g [_type=file label="nail file"]
h [_type=external label="outside"]
a->b->c->d->e->f->g->h
}
The trick is to generate the “stylesheet” real-time. Doable, but I could never come up with reasonable requirements.