From 8965203dd73f8888fbfdadcf5b8d7fe48985626d Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Thu, 21 Mar 2019 14:28:18 +0100 Subject: [PATCH] Add top 5 mate drinkers runnable - Update readme with info about runnables. --- README.md | 6 ++++++ run/top5_mate_stats.py | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100755 run/top5_mate_stats.py diff --git a/README.md b/README.md index 4e5c14d..6db46b6 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ Somehow friendly API to get and share coffee related data from database. # Development +## Runnables +Scripts to be run by systemd timers should by as simple as possible, runnable, +python3 script file. + +There are no tests needed for runnables. + ## Timers For running tasks periodically, please see [Timers][6] and [User][7] pages about systemd on archlinux wiki. diff --git a/run/top5_mate_stats.py b/run/top5_mate_stats.py new file mode 100755 index 0000000..e5ebe1e --- /dev/null +++ b/run/top5_mate_stats.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +"""Get top 5 mate drinkers and post it to Slack.""" +from cbgetter import CoffeebotGetter + +if __name__ == "__main__": + g = CoffeebotGetter() + g.loadTopMateDrinkers() + g.sendMsgToSlack() -- 2.39.2