datatracker/ietf/bin/graphall
2010-07-21 12:48:05 +00:00

31 lines
767 B
Bash
Executable file

#!/bin/sh
#
# Copyright The IETF Trust 2007, All Rights Reserved
#
# Requires modelviz.py from
# http://code.djangoproject.com/wiki/DjangoGraphviz
#
PYTHONPATH=`dirname $PWD`
export PYTHONPATH
DJANGO_SETTINGS_MODULE=ietf.settings
export DJANGO_SETTINGS_MODULE
for d in *
do
if grep models.Model $d/models.py > /dev/null 2>&1
then
python modelviz.py $d
fi
done > models-base.dot
unflatten -f -l 10 models-base.dot | gvpr -c '
BEG_G {
node_t title = node($G, "title");
title.shape="parallelogram";
string model = $G.name;
model = sub(model, "^ietf.");
model = sub(model, ".models$");
title.label = model;
title.fontsize = 24;
}
' > models.dot
dot -Tps -Gsize=10.5,8.0 -Gmargin=0.25 -Gratio=auto -Grotate=90 models.dot | sed -e 's/ Bold/-Bold/' > models.ps