28 lines
680 B
Bash
Executable file
28 lines
680 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# 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 | unflatten -f -l 10 | 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
|