]> rtime.felk.cvut.cz Git - hubacji1/coffee-getter.git/commitdiff
Update drunk sum runnable
authorJiri Vlasak <jiri.vlasak.2@cvut.cz>
Mon, 7 Nov 2022 15:19:09 +0000 (16:19 +0100)
committerJiri Vlasak <jiri.vlasak.2@cvut.cz>
Mon, 7 Nov 2022 15:19:09 +0000 (16:19 +0100)
run/drunk_sum.py

index eeec196ecd112adfe8a12dde886908cc29805eea..4abc0ea4a159eb17e752b793714982242977232c 100755 (executable)
@@ -1,8 +1,6 @@
 #!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-"""Print drunk drink in time period."""
 from sys import argv, exit
-from cbgetter import CoffeebotGetter
+from coffee_getter.bot import Bot
 
 SS = {
     "covfefe": "espresso;espresso lungo;cappuccino;latte macchiato",
@@ -32,11 +30,11 @@ if __name__ == "__main__":
         print("- covfefe (equal to coffee)")
         print("- mate (for all Club-mates)")
         exit(1)
-    g = CoffeebotGetter()
+    b = Bot()
     if ";" in argv[1]:
-        g.loadDrunkList(argv[1], argv[2], argv[3])
+        b.load_drunk_list(argv[1], argv[2], argv[3])
     elif argv[1] in SS:
-        g.loadDrunkSum(SS[argv[1]], argv[2], argv[3])
+        b.load_drunk_sum(SS[argv[1]], argv[2], argv[3])
     else:
-        g.loadDrunkSum(argv[1], argv[2], argv[3])
-    print(g.getMsg())
+        b.load_drunk_sum(argv[1], argv[2], argv[3])
+    print(b.get_msg())