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
This commit is contained in:
HanishKVC 2024-05-12 13:50:22 +05:30
parent b5b274a44b
commit b8590e3e57

View file

@ -15,7 +15,8 @@ def kv_bool(j, tmpl, k1, comma):
fp=open(sys.argv[1]) fp=open(sys.argv[1])
j=json.load(fp) 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: for tmpl in j:
print("\t{{ \"{}\", {{".format(tmpl)) print("\t{{ \"{}\", {{".format(tmpl))
@ -45,5 +46,5 @@ for tmpl in j:
print("\t}},") print("\t}},")
print("}") print("}};")