From 0c21a0084f061cce79b647e7be3b284ef346a2c4 Mon Sep 17 00:00:00 2001 From: HanishKVC Date: Sun, 12 May 2024 12:29:16 +0530 Subject: [PATCH] ChatON:p1: meta json to hpp conversion - Initial skeleton load the json file and put the template ids --- scripts/chaton-meta-json-to-hpp.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 scripts/chaton-meta-json-to-hpp.py diff --git a/scripts/chaton-meta-json-to-hpp.py b/scripts/chaton-meta-json-to-hpp.py new file mode 100755 index 000000000..a1272deb2 --- /dev/null +++ b/scripts/chaton-meta-json-to-hpp.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 +# Convert chaton meta json file to c++ hpp file +# by Humans for All + +import sys +import json + +fp=open(sys.argv[1]) +j=json.load(fp) +print("{") +for tmpl in j: + print("\t{{ \"{}\", ".format(tmpl)) +