portviz

portviz is a simple script, written in Python, that can create a dependency graph by querying the Macports database.

Features

  • Export to DOT, PNG, PDF, or any other format that Graphviz supports
  • Clear, commented source code

Requirements

Options

-h, --help
show this help message and exit
-i, --installed
Graph only installed ports. [default]
-a, --all
Graph all ports in Macports database.
-l LAYOUT, --layout=LAYOUT
Layout to be used by GraphViz for visualization. Layouts: circo dot fdp neato nop nop1 nop2 twopi
-o FILE, --output=FILE
Render graph to output file. Type is automatically detected by file extension. If not specified, outputs to DOT format on stdout

Download

Portviz 0.2 is very different from 0.1: it uses pydot instead of pygraphviz, and it uses a Python-Tcl bridge to make querying Macports faster. However, it is less flexible than version 0.1. 0.2 only supports viewing installed ports, while 0.1 also supports viewing all ports in the database -- although I'm not sure why you'd want to do that. Take your pick!

License

This work is released under the MIT license.