From b3502d10226eb10227a7ede2d2e792fa59097829 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 10 May 2024 00:12:21 +0000 Subject: [PATCH] Add new topo_tree_dump.py This is useful for quickly searching for something in topologies. Also a good starting point. --- tools/topo_tree_dump.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 tools/topo_tree_dump.py diff --git a/tools/topo_tree_dump.py b/tools/topo_tree_dump.py new file mode 100755 index 00000000..2c948dc0 --- /dev/null +++ b/tools/topo_tree_dump.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 + +""" +Do not make this script longer or more complicated. Use it as starting +point if needed. + +Pro tip: try these commands _interactively_ from `ipython3` +""" + +import sys +import tplgtool2 + +tplgFormat = tplgtool2.TplgBinaryFormat() + +parsedTplg = tplgFormat.parse_file(sys.argv[1]) + +print(parsedTplg)