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:
parent
b5b274a44b
commit
b8590e3e57
1 changed files with 3 additions and 2 deletions
|
@ -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("}};")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue