GML2GV,GV2GML(1)

๐Ÿ“ฆ
version 16.1.0 ยท 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

๐Ÿ’– GML2GV,GV2GML ๐Ÿ’–

okay bestie, sit down, hydrate, because today we're talking about a two-for-one situation: gml2gv and gv2gml, the GML-DOT converters, both living in section 1 of the manual (that's General Commands Manual energy, iykyk). two icons, one page, no notes. ๐ŸŽ€


โœจ SYNOPSIS โœจ

gml2gv [ -?v ] [ -ggname ] [ -ooutfile ] [ files ]
gv2gml [ -y ] [ -?  ] [ -ooutfile ] [ files ]

look at them. so tidy. so slay. ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so here's the tea, bestie:

  • gml2gv takes a graph that's written in the GML format and converts it into a graph in the GV format โ€” and yes, GV is the thing that used to be called DOT, the glow-up was real. โญ
  • gv2gml goes the other way around: it takes a graph in the GV format and hands you back a graph in the GML format. ๐Ÿ”

it's giving translator besties. one speaks GML, one speaks GV, they're each other's duolingo streak. ๐Ÿฆ‰


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

The following options are supported (and yes, we're going through every single one, no skipping, that's the rule ๐Ÿ’–):

  • -v โ€” turns on verbose mode. it will simply talk to you more. main character behavior honestly. ๐Ÿ—ฃ๏ธ
  • -y โ€” uses attributes according to yWorks.com documentation instead of the GML specification. so like, a different rulebook for the attributes. pick your canon, bestie. ๐Ÿ“š
  • -? โ€” prints usage information and then exits. it's the "what do you want from me" flag. ๐Ÿ™ˆ
  • -ggname โ€” the string gname gets used as the name of the generated graph. and if multiple graphs get generated, the subsequent graphs use the name gname appended with an integer. so gname, then gname + a number, then another number, etc. cute little sequel naming convention, very franchise of them. ๐Ÿ”ข
  • -ooutfile โ€” prints output to the file outfile. and if you don't give it one? gml2gv uses stdout. so it just yells into your terminal, as nature intended. ๐Ÿ“ข

๐ŸŒธ OPERANDS ๐ŸŒธ

The following operand is supported:

  • files โ€” names of files containing 1 or more graphs in GML. and if you don't specify any files operand at all, the standard input will be used. so you can just pipe it in like the tech-savvy legend you are. ๐Ÿซถ

๐ŸŽ€ RETURN CODES ๐ŸŽ€

  • returns 0 if there were no problems during conversion โœจ
  • returns non-zero if any error occurred ๐Ÿ’€

so like, 0 = good vibes, anything else = the vibe check failed. ๐Ÿ˜ญ


๐Ÿ’€ LIMITATIONS ๐Ÿ’€

okay this is the part where we get real, bestie, because the manual is about to humble us:

  • the graph and graphics models of GV and GML differ significantly, so the conversion is at best approximate. it's not a perfect match, it's a vibe-based approximation. ๐Ÿซ 
  • in particular, it is not clear how multiedges are differentiated in GML, so multiedges are created in GV with no user-available key. that's just how it is, no cap.
  • also, no attribute information is lost, in that any GML attributes that aren't converted to GV equivalents are retained as attributes in the output graph. nothing gets ghosted here, everything is kept. ๐Ÿฅฐ
  • at present, gv2gml does not support subgraphs and clusters. nope. not supported. don't ask. ๐Ÿšซ
  • in addition, there does not appear to be a standard mechanism for specifying default node and edge attributes in GML, so any attributes are repeated for every node and edge. yeah. every single one. it's verbose like that. ๐Ÿ˜ฎโ€๐Ÿ’จ
no fr, remember: this conversion is approximate, gv2gml has no subgraph/cluster support, and multiedges come out of GML with no user-available key in GV. the manual said it, so we said it. ๐Ÿซก

๐Ÿ’œ AUTHORS ๐Ÿ’œ

  • Emden R. Gansner <erg@research.att.com> โ€” the icon, the moment, the legend who wrote this. ๐Ÿ‘‘

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

go read those next, bestie, that's the homework. ๐Ÿ“–โœจ


and that's the whole page! ๐Ÿ’… this was GML2GV,GV2GML(1) from the General Commands Manual, dated 24 June 2011 โ€” yes, that's the source/version-and-date sign-off, we're closing it out with a lil curtsy ๐ŸŽ€. mwah, go convert some graphs, you've got this. ๐Ÿ’–๐Ÿฆ‹๐ŸŒธ

๐Ÿ“ฆ where this page comes from