summaryrefslogtreecommitdiffstats
path: root/inventar/templates/graph.txt
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2012-07-27 00:25:24 +0200
committerSebastian Reichel <sre@ring0.de>2012-07-27 00:25:24 +0200
commit05b408ad3047e40a63c16c367500e925986490a1 (patch)
treee39bb7a292c6d11c5f5104a3dab3645382a23297 /inventar/templates/graph.txt
parentc8c21d921094a33585cc66d95eaac38d0a5dd388 (diff)
downloadktt-inventory-system-05b408ad3047e40a63c16c367500e925986490a1.tar.bz2
add templates
Diffstat (limited to 'inventar/templates/graph.txt')
-rw-r--r--inventar/templates/graph.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/inventar/templates/graph.txt b/inventar/templates/graph.txt
new file mode 100644
index 0000000..74e26f0
--- /dev/null
+++ b/inventar/templates/graph.txt
@@ -0,0 +1,25 @@
+{% load graph_extras %}
+# Graph of KtT Inventory
+#
+# Usage:
+# wget -O graph.txt "http://hackspace.elektranox.org/graph/"
+# graph-easy --dot graph.txt > graph.dot
+# dot -Tsvg < graph.dot > graph1.svg
+# twopi -Tsvg < graph.dot > graph2.svg
+# circo -Tsvg < graph.dot > graph3.svg
+
+graph {
+ label: Graph of KtT Items;
+ autolink: name;
+ linkbase: http://hackspace.elektranox.org/item/
+}
+
+{% autoescape off %}
+{% for item in items %}
+{% if item.parent %}
+[{{item.one_barcode}}] { label: "{{item.name|graphescape}}" } -> [{{item.parent.one_barcode}}]
+{% else %}
+[{{item.one_barcode}}] { label: "{{item.name|graphescape}}" }
+{% endif %}
+{% endfor %}
+{% endautoescape %}