summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-02-06 09:11:53 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-02-06 09:11:53 +0100
commit3e941bddfe25777f32c8d0e5a018e7da17bb15b2 (patch)
tree2bede792cdbd58e3ccae1e217254415fe016c0fe /bin
parentb04085507479962ccd40f962b62e795ad54998f0 (diff)
--export-json: pretty-print for easier manual editing
Diffstat (limited to 'bin')
-rwxr-xr-xbin/analyze-kconfig.py8
-rwxr-xr-xbin/analyze-log.py8
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(";"):