mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
Makes the graph fit better on the screen. (imported from commit 7d42caca478634143c6b291f47a4642acfdd1128)
20 lines
449 B
Bash
Executable File
20 lines
449 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
# Draws the Django template inheritance graph.
|
|
|
|
cd "$(dirname "$0")"/../templates
|
|
|
|
(
|
|
echo 'digraph {'
|
|
for t in $(find -name '*.html' -printf '%P\n'); do
|
|
echo "\"$t\";" | sed 's|/|\\n|g'
|
|
perl -lne 'print "\"'"$t"'\" -> \"$1\";" if m/{%\s*extends\s*"([^"]+)"/' "$t" \
|
|
| sed 's|/|\\n|g'
|
|
done
|
|
echo '}'
|
|
) > graph.dot
|
|
|
|
dot -Tsvg graph.dot > graph.svg
|
|
rm graph.dot
|
|
echo file://"$(pwd)"/graph.svg
|