Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ioannad/asd-graph

Graphs dependencies in the asd files of Common Lisp systems.
https://github.com/ioannad/asd-graph

Last synced: 3 days ago
JSON representation

Graphs dependencies in the asd files of Common Lisp systems.

Awesome Lists containing this project

README

        

# ASD-GRAPH

This small utility uses graphviz dot to visualise the dependencies
declared in a Common Lisp `.asd` file.

## Requirements

* Linux OS

* Graphviz (dot should be in `/usr/bin/dot`)

* A Common Lisp REPL (CCL or SBCL, tested)

* Quicklisp

## Usage

Load this file in a Common Lisp REPL (tested with CCL and SBCL), and if `` is the path (including the path to the file) to the `.asd` you would like to draw the graph of, then evaluate:

`(asd-graph )`

optional keywords:

`:output-dir ` and `:format `

This will create a dot and an svg (or `` if keyword :format was used) file in the same
directory as ``, or in `` if keyword
:output-dir was used.

### Example usage

`(asd-graph "~/quicklisp/local-projects/jeffrey/jeffrey.asd")`

`(asd-graph "~/quicklisp/local-projects/jeffrey/jeffrey.asd" :format "pdf")`

### Formats supported by dot:

`` can take one of the following values:

canon, dot, fig, gd, gif, hpgl, imap, cmap, mif, mp, pcl, pic,
plain (ascii), png, ps, ps2, svg, vrml, vtx, wbmp.

According to the graphviz dot manual:
http://www.graphviz.org/Documentation/dotguide.pdf

### Supported .ASD syntax

For now, only the simplest .asd syntax is supported,
e.g.:

```common-lisp
(defsystem "hello-lisp"
:description "hello-lisp: a sample Lisp system."
:version "0.0.1"
:author "Joe User "
:licence "Public Domain"
:depends-on ("optima.ppcre" "command-line-arguments")
:components ((:file "packages")
(:file "macros" :depends-on ("packages"))
(:file "hello" :depends-on ("macros"))))
```

This example is from the [ASDF Manual](https://common-lisp.net/project/asdf/asdf.html#The-defsystem-form)

This utility visualises the part after `:components`.

## Examples

* The well known [alexandria package](https://gitlab.common-lisp.net/alexandria/alexandria) for common-lisp

* My pet project, jeffrey, aka [CGraph, the Choiceless Grapher](https://github.com/ioannad/jeffrey)