From 5be351dbe7feb4c8cfd28da883a6904ab7fc57b3 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Fri, 29 Sep 2023 16:48:26 +0200 Subject: global product index --- run.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'run.py') diff --git a/run.py b/run.py index 41c1f59..de6a078 100755 --- a/run.py +++ b/run.py @@ -2,6 +2,7 @@ import sys import yaml +import json import matplotlib.pyplot as plt from metpy.units import units @@ -19,11 +20,16 @@ conf = None with open(FILE, 'r') as f: conf = yaml.safe_load(f) +index = [] + for plotter in conf['plotter']: modname = plotter['module'] del plotter['module'] mod = __import__(modname, fromlist=[None]) - mod.run(**plotter) + index.extend(mod.run(**plotter)) plt.close('all') + +with open(conf['index'], 'w') as f: + f.write(json.dumps(index, indent=4)) -- cgit v1.2.3