diff --git a/daemon.py b/daemon.py new file mode 100755 index 0000000..eadfef8 --- /dev/null +++ b/daemon.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python +import time + +import requests + +import config +from plugins import plugins + + +def main(): + data = requests.get(config.CAR_API_URL) + for plugin in plugins: + plugin.check(data) + +if __name__ == "__main__": + while True: + main() + time.sleep(config.DELAY) diff --git a/plugins/__init__.py b/plugins/__init__.py new file mode 100644 index 0000000..bf320ab --- /dev/null +++ b/plugins/__init__.py @@ -0,0 +1 @@ +plugins = []