From 08ecdea5e7b838e94b6654eb165f0f652ebbb584 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 7 Sep 2017 03:26:56 +0200 Subject: Add support for priority tags. In 1.x, there's no way around using it. --- scripts/build-command-templates | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'scripts/build-command-templates') diff --git a/scripts/build-command-templates b/scripts/build-command-templates index 70020ecc6..3c95bde21 100755 --- a/scripts/build-command-templates +++ b/scripts/build-command-templates @@ -79,7 +79,7 @@ def get_properties(p): try: props["help"] = p.find("help").text except: - props["help"] = None + pass # Get value help strings try: @@ -91,9 +91,18 @@ def get_properties(p): except: props["val_help"] = [] + # Get priority + try: + props["priority"] = p.find("priority").text + except: + pass + return props def make_node_def(props): + # XXX: replace with a template processor if it grows + # out of control + node_def = "" if "tag" in props: @@ -101,6 +110,9 @@ def make_node_def(props): node_def += "type: {0}\n".format(props["type"]) + if "priority" in props: + node_def += "priority: {0}\n".format(props["priority"]) + if "help" in props: node_def += "help: {0}\n".format(props["help"]) -- cgit v1.2.3