summaryrefslogtreecommitdiff
path: root/waterspout_radar/cli.py
blob: ecf79d8ce19085ed449d98423071a27cd2076b75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()