diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2023-09-29 16:48:26 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2023-09-29 16:48:26 +0200 |
commit | 5be351dbe7feb4c8cfd28da883a6904ab7fc57b3 (patch) | |
tree | 761b45b9914679952a66bafc435a48537ce795d7 /run.py | |
parent | 09dbbe809ab6a3728e971a29e7704ffa0ecb93a7 (diff) | |
download | meteo_toolbox-5be351dbe7feb4c8cfd28da883a6904ab7fc57b3.tar.gz |
global product index
Diffstat (limited to 'run.py')
-rwxr-xr-x | run.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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)) |