From 3b679d18faa2dae02c35c46833f785e7f50f56db Mon Sep 17 00:00:00 2001
From: zlovarp <arpad.lovassy@semcon.com>
Date: Wed, 7 Mar 2018 14:23:36 +0100
Subject: [PATCH] script re-added

Signed-off-by: zlovarp <arpad.lovassy@semcon.com>
---
 etc/scripts/tpd_graph_xml2dot.py | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 etc/scripts/tpd_graph_xml2dot.py

diff --git a/etc/scripts/tpd_graph_xml2dot.py b/etc/scripts/tpd_graph_xml2dot.py
new file mode 100644
index 000000000..6a64f881e
--- /dev/null
+++ b/etc/scripts/tpd_graph_xml2dot.py
@@ -0,0 +1,28 @@
+##############################################################################
+# Copyright (c) 2000-2017 Ericsson Telecom AB
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#   Balasko, Jeno
+#   Delic, Adam
+#
+##############################################################################
+import xml.etree.ElementTree as ET
+tree = ET.parse('project_hierarchy_graph.xml')
+root = tree.getroot()
+f = open('project_hierarchy_graph.dot', 'w')
+f.write("digraph PROJECT_HIERARCHY_GRAPH {\n")
+for project in root:
+	for reference in project:
+		f.write(project.attrib['name'])
+		f.write(" -> ")
+		f.write(reference.attrib['name'])
+		f.write(";\n")
+f.write("}\n")
+f.close()
+
+# use this to generate graph:
+# > dot -Tpng project_hierarchy_graph.dot -o project_hierarchy_graph.png
-- 
GitLab