]> rtime.felk.cvut.cz Git - hubacji1/coffee-getter.git/commitdiff
Add top 5 mate drinkers runnable
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 21 Mar 2019 13:28:18 +0000 (14:28 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 21 Mar 2019 13:35:32 +0000 (14:35 +0100)
- Update readme with info about runnables.

README.md
run/top5_mate_stats.py [new file with mode: 0755]

index 4e5c14d39cdaf4f99edfeab34bd98af68151e7b9..6db46b65b7b6bea8d245f29e243e45f03e46c662 100644 (file)
--- 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 (executable)
index 0000000..e5ebe1e
--- /dev/null
@@ -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()