[instaviz-users] Opinions wanted: Graphviz URL scheme

Petri Sirkkala sirpete at iki.fi
Fri Mar 20 13:20:31 CDT 2009


Hi Glen,

I would use / characters for giving more information about the graph.
For instance
graphviz://Label/Graph 1/Layout/Tree/Background/lime/digraph G { hello
-> world; }

UTF-8 can be encoded to URL-coding, it just looks very encoded :).

The URL is limited to certain amount of characters, usually less than
5000. I guess that is not a concern here.

The internal dot-document that Graphviz produces uses uids for each
node, even if node labels are unique and proper for dot-node
identifiers. It would be nice if uids would be generated only when
neccessary, so the exported dot file could be used to make these urls
too.

-Pete

2009/3/20 Glen Low <glen.low at pixelglow.com>:
> Hi All
>
> I'd like to propose a Graphviz URL scheme for passing graphs into the
> GUI viewers and/or Instaviz. Handling such custom URL's is the primary
> IPC (interprocess communication) method on the iPhone, but would also
> have broad support in Windows and Mac OS X.
>
> Essentially you'd take a Graphviz graph, %-encode it and whack a
> graphviz "protocol" at the beginning of it:
>
> e.g.
>
> digraph G { hello -> world; }
>
> becomes
>
> graphviz:digraph%20G%20%7B%20hello%20-%3E%20world%3B%20%7D
>
> If you put such a link into an email or a website and click on it on
> the iPhone, you would then open Instaviz (the next version) with the
> embedded graph. Similarly on Mac OS X (or Windows), clicking on such a
> link would open the graph in the Graphviz viewer (some near future
> version, if AT&T is happy with me putting such support in the Graphviz
> package). It's a little easier for web authors to write these than
> say, convince the web server to output MIME type text/vnd.graphviz if
> they don't have control over it, and the graph would be embedded
> within the HTML rather than exist as a separate file.
>
> (Conceptually such a URL is equivalent to a data URL of the form
>
> data:text/vnd.graphviz;charset=UTF-8,digraph%20G%20%7B%20hello%20-%3E
> %20world%3B%20%7D
>
> )
>
> I invite your comments. I'm trying to keep it simple but want to iron
> out any wrinkles before rolling out something that could end up a de
> facto standard. It should be fairly easy for a human and/or some
> quickly hacked together script to convert between a Graphviz graph and
> a Graphviz URL.
>
> e.g.
>
> 1.      Should it be graphviz:// or just graphviz:  -- do the usual URL
> recognizers in various mail programs pick it up? (Most non-host-
> referencing URL schemes omit the // e.g. mailto:, data: and
> javascript: )
> 2.      Is the format too verbose / not human readable? Given the
> limitations of the URL format itself... note that you could simply
> type graphviz:digraph G { hello -> world; } ... into a web browser
> address bar and it should do the right %-encoding for you, and
> automagically open in Graphviz (some future version)....
> 3.      What should/would happen with UTF-8 data in the graph?
> etc.
>
>
>
>
>
>
> Cheers, Glen Low
>
>
> ---
> pixelglow software | simply brilliant stuff
> www.pixelglow.com
> aim: pixglen
> twitter: pixelglow
>
> _______________________________________________
> instaviz-users mailing list
> instaviz-users at pixelglow.com
> http://lists.pixelglow.com/listinfo/instaviz-users
>



-- 
Petri Sirkkala, sirpete(ät)iki.fi, Skype: sirpete
+358 400 98 2998 // ...likes Gmail... //


More information about the instaviz-users mailing list