diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/analyze-kconfig.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index 6887489..dc6d187 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -137,8 +137,20 @@ def main(): print("TODO") if args.export_tree: + complete_json_model = model.to_json( + with_param_name=True, param_names=parameter_names + ) + json_model = dict() + for name, attribute_data in complete_json_model["name"].items(): + for attribue, data in attribute_data.items(): + # data.update({ + # "unit": "", + # "description": attribute, + # "minimize": True + # }) + json_model[attribute] = data with open(args.export_tree, "w") as f: - json.dump(model.to_json(), f, sort_keys=True, cls=dfatool.utils.NpEncoder) + json.dump(json_model, f, sort_keys=True, cls=dfatool.utils.NpEncoder) if args.config: kconf = kconfiglib.Kconfig(args.kconfig_path) |