nop

Pretty-print DOT graph file. Equivalent to nop1.

Prints input graphs in pretty-printed (canonical) form.

Example, indenting the input:

$ echo 'digraph { a -> b; c->d; }' | nop
digraph {
        a -> b;
        c -> d;
}

nop also deduplicates node specifications:

$ echo 'digraph { a; a [label="A"]; a [color=blue]; }' | nop
digraph {
        a       [color=blue,
                label=A];
}

nop -p produces no output, just checks the input for valid DOT language.

For example, this valid graph produces no output:

$ echo 'digraph {}' | nop -p

But this syntax error (missing }) exits with status code 1 and prints error message:

$ echo 'digraph {' | nop -p
Error: <stdin>: syntax error in line 2