Added command aliases & 404 error message
This commit is contained in:
parent
2a49fb5668
commit
e404753714
|
@ -26,7 +26,7 @@ class MainLoop:
|
||||||
|
|
||||||
if refetch == 0:
|
if refetch == 0:
|
||||||
self.controller.time()
|
self.controller.time()
|
||||||
Departure.fetch(self.stop_id, 10)
|
Departure.fetch(self.stop_id, 20)
|
||||||
|
|
||||||
refetch = (refetch + 1) % 3
|
refetch = (refetch + 1) % 3
|
||||||
regenerate = (regenerate + 1) % (6*30)
|
regenerate = (regenerate + 1) % (6*30)
|
||||||
|
@ -42,19 +42,19 @@ class MainLoop:
|
||||||
print("> ", end="")
|
print("> ", end="")
|
||||||
command = input()
|
command = input()
|
||||||
|
|
||||||
if command == "d":
|
if command in ["d", "dep", "departures"]:
|
||||||
print("")
|
|
||||||
for did in Departure.storage:
|
for did in Departure.storage:
|
||||||
print(Departure.storage[did])
|
print(Departure.storage[did])
|
||||||
print("")
|
if len(Departure.storage) == 0:
|
||||||
|
print("No loaded departures")
|
||||||
|
|
||||||
if command == "q":
|
if command in ["q", "queue"]:
|
||||||
print("")
|
|
||||||
for m in self.controller.message_pool:
|
for m in self.controller.message_pool:
|
||||||
print(m)
|
print(m)
|
||||||
print("")
|
if len(self.controller.message_pool) == 0:
|
||||||
|
print("No messages in queue")
|
||||||
|
|
||||||
if command == "s":
|
if command in ["s", "stop"]:
|
||||||
print("Stopping...")
|
print("Stopping...")
|
||||||
self.ended = True
|
self.ended = True
|
||||||
self.controller.message_pool = []
|
self.controller.message_pool = []
|
||||||
|
|
Loading…
Reference in a new issue