From b8590e3e5722cf047af075aae660227946f81733 Mon Sep 17 00:00:00 2001 From: HanishKVC Date: Sun, 12 May 2024 13:50:22 +0530 Subject: [PATCH] ChatON:P5:meta json to hpp: Add required c++ inc and global var Also comment to indicate that the hpp file is auto converted from the chaton_meta.json file --- scripts/chaton-meta-json-to-hpp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/chaton-meta-json-to-hpp.py b/scripts/chaton-meta-json-to-hpp.py index 95368eef5..6c08ca4db 100755 --- a/scripts/chaton-meta-json-to-hpp.py +++ b/scripts/chaton-meta-json-to-hpp.py @@ -15,7 +15,8 @@ def kv_bool(j, tmpl, k1, comma): fp=open(sys.argv[1]) j=json.load(fp) -print("{") +print("//This is auto created/converted from chaton-meta-json file") +print("#pragma once\n\n#include \"chaton.hpp\"\n\nChatTemplates gCT = {{") for tmpl in j: print("\t{{ \"{}\", {{".format(tmpl)) @@ -45,5 +46,5 @@ for tmpl in j: print("\t}},") -print("}") +print("}};")