lean2/extras/depgraph
2016-07-09 10:20:21 -07:00
..
leandeps.py fix(extras/depgraph): calculate lean executable path from PATH or guess 2015-12-19 23:03:53 -05:00
README.md doc(depgraph): update installation instructions 2016-07-09 10:20:21 -07:00

Generating Dependency Graph

Usage:

./leandeps.py [options] dir/file

For example:

./leandeps.py ../../library/

If argument is a directory, all source files below that directory will be included in the graph.

  • -h/--help : prints this message
  • -o <file>/--output <file> : saves the DOT output in the specified file

If no output file is specified, deps.gv and deps.gv.dot is written to.

You need graphviz and the graphviz python library. If you already have pip, you can do:

sudo apt-get install graphviz
sudo pip install graphviz

The resulting deps.gv.dot file can be run through tred and dot from graphviz to produce, e.g., an svg file. For example:

tred deps.gv.dot > treddeps.dot
dot -Tsvg -O treddeps.dot