LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

dot2gxl

Convert Graphviz DOT/GV graphs to GXL

TLDR

Convert a DOT graph to GXL
$ dot2gxl [input.dot] -o [output.gxl]
copy
Convert from a .gv file (suffix selects GV → GXL)
$ dot2gxl [input.gv] > [output.gxl]
copy
Convert GXL back to GV from a .gxl suffix
$ dot2gxl [input.gxl] > [output.gv]
copy
Force GV input and GXL output, ignoring the file name
$ dot2gxl -g [input.dot] -o [output.gxl]
copy
Force GXL input and GV output
$ dot2gxl -d [input.gxl] -o [output.gv]
copy
Convert from stdin (name `dot2gxl` means GV → GXL)
$ cat [input.dot] | dot2gxl > [output.gxl]
copy

SYNOPSIS

dot2gxl [-gd?] [-o outfile] [files]

DESCRIPTION

dot2gxl converts between graphs in the Graphviz GV/DOT language and GXL (Graph eXchange Language), an XML interchange format. It is a name for the same binary as gxl2gv, gv2gxl, and gxl2dot.Unless -g or -d is given, the conversion direction comes from the input suffix: .gv or .dot means GV → GXL, and .gxl means GXL → GV. With no suffix (for example a pipe) and no flags, the executable name decides: names starting with d (dot2gxl) convert GV → GXL, gv2gxl does the same, and gxl2gv / gxl2dot convert GXL → GV.GXL can describe a richer graph model than GV. Constructs that have no GV analogue are stored as attributes. Applying gxl2gv and then gv2gxl is intended to be semantically the identity.

PARAMETERS

-g

Treat the input as GV/DOT and write GXL, ignoring the command name and file suffixes.
-d
Treat the input as GXL and write GV, ignoring the command name and file suffixes.
-o outfile
Write to outfile instead of standard output.
-?
Print usage and exit.
files
Graph files in GV/DOT or GXL. With no files, read standard input.

INSTALL

sudo apt install graphviz
copy
sudo dnf install graphviz
copy
sudo pacman -S graphviz
copy
sudo apk add graphviz
copy
sudo zypper install graphviz
copy
brew install graphviz
copy
nix profile install nixpkgs#graphviz
copy

CAVEATS

Conversion runs in only one direction even when several files have mixed suffixes. A GXL file may contain only one graph. Some GXL constructs cannot be mapped. GXL → GV needs Graphviz built with Expat.

HISTORY

dot2gxl is an installed alias of gxl2gv, written by Krishnam Pericherla and Emden R. Gansner at AT&T Labs as part of Graphviz.

SEE ALSO

gv2gxl(1), gxl2gv(1), dot(1), graphml2gv(1)

RESOURCES

Copied to clipboard
Kai