]> rtime.felk.cvut.cz Git - hubacji1/coffee-getter.git/commitdiff
Update drunk sum runnable with drunk list
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 4 Apr 2019 06:16:08 +0000 (08:16 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 4 Apr 2019 06:16:10 +0000 (08:16 +0200)
CHANGELOG.md
run/drunk_sum.py

index 3a47cd6d011897a1d8e659ba84bb088dabf00c92..75df2043a61cad452381a1ef9a8d25540a9217af 100644 (file)
@@ -11,6 +11,7 @@ The format is based on [Keep a Changelog][] and this project adheres to
 ### Added
 - Support for multiple drinks in `drunk_sum` runnable.
 - Sum all the coffees by one command.
+- Get drunk sums of some *flavors* in specified time period as list.
 
 ## 0.2.1 - 2019-04-03
 ### Fixed
index ef683fcd249f75b934e61f830cbf3c43b1afa9de..44da8e737aecb37931dbf740d6e995fa35f72e67 100755 (executable)
@@ -23,7 +23,9 @@ if __name__ == "__main__":
         ))
         exit(1)
     g = CoffeebotGetter()
-    if argv[1] in SS:
+    if ";" in argv[1]:
+        g.loadDrunkList(argv[1], argv[2], argv[3])
+    elif argv[1] in SS:
         g.loadDrunkSum(SS[argv[1]], argv[2], argv[3])
     else:
         g.loadDrunkSum(argv[1], argv[2], argv[3])