diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-02-06 09:11:53 +0100 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-02-06 09:11:53 +0100 |
commit | 3e941bddfe25777f32c8d0e5a018e7da17bb15b2 (patch) | |
tree | 2bede792cdbd58e3ccae1e217254415fe016c0fe /bin | |
parent | b04085507479962ccd40f962b62e795ad54998f0 (diff) |
--export-json: pretty-print for easier manual editing
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/analyze-kconfig.py | 8 | ||||
-rwxr-xr-x | bin/analyze-log.py | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index c369c05..b333613 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -592,7 +592,13 @@ def main(): if args.export_json: with open(args.export_json, "w") as f: - json.dump(model.to_json(), f, sort_keys=True, cls=dfatool.utils.NpEncoder) + json.dump( + model.to_json(), + f, + sort_keys=True, + cls=dfatool.utils.NpEncoder, + indent=2, + ) if args.config: kconf = kconfiglib.Kconfig(args.kconfig_path) diff --git a/bin/analyze-log.py b/bin/analyze-log.py index 988d92f..5e4dded 100755 --- a/bin/analyze-log.py +++ b/bin/analyze-log.py @@ -271,7 +271,13 @@ def main(): if args.export_json: with open(args.export_json, "w") as f: - json.dump(model.to_json(), f, sort_keys=True, cls=dfatool.utils.NpEncoder) + json.dump( + model.to_json(), + f, + sort_keys=True, + cls=dfatool.utils.NpEncoder, + indent=2, + ) if args.plot_param: for kv in args.plot_param.split(";"): |