Files
2024-07-18 10:53:12 +08:00

15 lines
395 B
Python

from gen_api import parse_api_from_header
import os
curr_dir = os.path.abspath(os.path.dirname(__file__))
header_path = os.path.join(curr_dir, "..", "..", "components", "basic", "include", "maix_api_example.hpp")
res = parse_api_from_header(header_path, api_tree = {}, for_sdk=["maixpy", "maixcdk"])
import json, os
with open("test.json", "w") as f:
f.write(json.dumps(res, indent=4))