diff options
author | Aki <please@ignore.pl> | 2023-04-02 17:16:39 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-04-02 17:16:39 +0200 |
commit | 35a2e4fbfad0a9282980c6f13dc96009c1906b5b (patch) | |
tree | 10992c63aa799827d88948e75fd935090420680a /waterspout_radar/cli.py | |
parent | 8b7738d8af3a470fd6c1d5615eb4b64fd6231bff (diff) | |
download | waterspout-radar-35a2e4fbfad0a9282980c6f13dc96009c1906b5b.zip waterspout-radar-35a2e4fbfad0a9282980c6f13dc96009c1906b5b.tar.gz waterspout-radar-35a2e4fbfad0a9282980c6f13dc96009c1906b5b.tar.bz2 |
Exploded naive prototype into modularized package
Diffstat (limited to 'waterspout_radar/cli.py')
-rw-r--r-- | waterspout_radar/cli.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/waterspout_radar/cli.py b/waterspout_radar/cli.py new file mode 100644 index 0000000..ecf79d8 --- /dev/null +++ b/waterspout_radar/cli.py @@ -0,0 +1,19 @@ +import argparse + +from . import _config, _radar, _storage + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument( + "-c", "--config", default="radar.conf", + help="Pathname of the instance configuration file (default: %(default)s)") + args = parser.parse_args() + config = _config.load(args.config) + storage = _storage.Storage(config.db) + predictions = _radar.calculate(config) + storage.extend(predictions) + + +if __name__ == "__main__": + main() |