aboutsummaryrefslogtreecommitdiff
path: root/run.py
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-09-11 22:06:09 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-09-11 22:06:09 +0200
commit76a9a93d72ad3ff21854f532d64aca42c72c1ebf (patch)
treeaa928009aebd154eb59001ea73fa47524efd9c11 /run.py
parentba5ad1cb135cee769e92dd9b125e232db6ca6fb7 (diff)
downloadmeteo_toolbox-76a9a93d72ad3ff21854f532d64aca42c72c1ebf.tar.gz
confi reader
Diffstat (limited to 'run.py')
-rwxr-xr-xrun.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/run.py b/run.py
new file mode 100755
index 0000000..e1b6ad0
--- /dev/null
+++ b/run.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+
+import sys
+import yaml
+
+FILE = 'config.yaml'
+if len(sys.argv) > 1:
+ FILE = sys.argv[1]
+
+conf = None
+with open(FILE, 'r') as f:
+ conf = yaml.safe_load(f)
+
+for plotter in conf['plotter']:
+ modname = plotter['module']
+ del plotter['module']
+
+ mod = __import__(modname)
+ mod.run(**plotter)