diff options
Diffstat (limited to 'waterspout_radar/cli.py')
-rw-r--r-- | waterspout_radar/cli.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/waterspout_radar/cli.py b/waterspout_radar/cli.py index ecf79d8..24f9e53 100644 --- a/waterspout_radar/cli.py +++ b/waterspout_radar/cli.py @@ -11,8 +11,9 @@ def main(): args = parser.parse_args() config = _config.load(args.config) storage = _storage.Storage(config.db) - predictions = _radar.calculate(config) - storage.extend(predictions) + storage.extend(_radar.calculate(config)) + for prediction in sorted(storage, key=lambda x: (x.time, x.swi)): + print(prediction.time, prediction.low_clouds, prediction.swi) if __name__ == "__main__": |