Skip to content

zellerin/dot-stuff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Table of Contents

[in package DOT-STUFF with nicknames GV]

Convenience tools for Graphviz dot file creation.

  • [macro] WITH-NEW-DOT-FILE (FILE &KEY (NAME "D") (TYPE :DIGRAPH) (IF-EXISTS :SUPERSEDE)) &BODY BODY

    Open FILE for writing, put Graphviz boilerplate there and run BODY with *GV-STREAM* bound as a write stream to the file.

    TYPE controls what goes in the boilerplate - the boilerplate is

      graph|digraph <NAME> {
        (...)
      }
    

    IF-EXISTS is as in OPEN.

  • [function] LINK FROM TO &OPTIONAL (TYPE 'LINK)

    Print a graphviz link. FROM and TO are node names. TYPE is used as "type" attribute to the link

  • [function] LABEL ID NAME ATTRS

    Print a graphviz node ID with LABEL and other attributes to *GV-STREAM*.

    ATTRs should be a list of name-values (plist style).

  • [variable] *GV-STREAM* #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDOUT* {1002477363}>

    String to user for graphviz print operations.

  • [function] LINK-TO-MANY FROM TO &OPTIONAL (TYPE 'LINK)

    Print a graphviz link from one node (FROM) to several (TO, a list).

1 Example applications

  • [function] DRAW-SOME-DEPS FILE ROOT-NODE-NAMES SINK-NAMES TO-NAME-FN FROM-NAME-FN EXPAND-FN

    Make a graphviz FILE containing dependencies generated from ROOT-NODE-NAMES using EXPAND-FN.

    EXPAND-FN takes an existing node and returns list of pairs to add.

    SINK-NAMES are no longer expanded.

    TO-NAME-FN and FROM-NAME-FN are used to convert node objects to name or create node object from its name.

    See examples DRAW-SYSTEM-DEPS and DRAW-PACKAGE-DEPS.

  • [function] DRAW-PACKAGE-DEPS FILE PACKAGE-LIST KNOWN

    Draw dependencies of CL packages from PACKAGE-LIST into graphviz FILE.

    The COMMON-LISP package is not shown as a dependency for simple view.

    Example:

    (gv:draw-package-deps "/tmp/hunchentoot.gv" '(drakma hunchentoot) ())
    

  • [function] DRAW-SYSTEM-DEPS FILE SYSTEMS-LIST SINKS

    Draw dependencies of an ASDF systems in SYSTEMS-LIST to a graphviz FILE.

    Example: draw dependencies of Hunchentoot asdf package, do not expand cffi and cl+ssl.

    (gv:draw-system-deps "/tmp/hunchentoot.gv" '(hunchentoot) '(cl+ssl))
    


[generated by MGL-PAX]

About

Private helpers for writing dot files in CL.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published