-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbump-bot
More file actions
executable file
·62 lines (54 loc) · 2.39 KB
/
bump-bot
File metadata and controls
executable file
·62 lines (54 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env python
from bump import bump
from read_emails import listen
import time
import os
import sys
from read_emails import user, read_emails, manual_input
# To generate the tui
def menu():
header()
print("\nBump Bot. Queue songs on Spotify by email. By Chichri\n")
command_list()
# Prints out initial command list
while True:
try:
dec = input('> ')
dec = dec.rstrip()
if dec == '1':
os.system('clear')
print("listening on account: " + user + '... (Ctrl C or close window to quit')
read_emails()
elif dec == '2':
manual_input()
elif dec == 'quit':
break
else:
print("I'm sorry, I didn't recognize that command.")
except KeyboardInterrupt:
break
# credit to patorjk for his acsii text generator
def header():
print()
print(' ██████╗ ██╗ ██╗███╗ ███╗██████╗ ██████╗ ██████╗ ████████╗')
print(' ██╔══██╗██║ ██║████╗ ████║██╔══██╗ ██╔══██╗██╔═══██╗╚══██╔══╝')
print(' ██████╔╝██║ ██║██╔████╔██║██████╔╝ ██████╔╝██║ ██║ ██║ ')
print(' ██╔══██╗██║ ██║██║╚██╔╝██║██╔═══╝ ██╔══██╗██║ ██║ ██║ ')
print(' ██████╔╝╚██████╔╝██║ ╚═╝ ██║██║ ██████╔╝╚██████╔╝ ██║ ')
print(' ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ')
def command_list():
print("""
[\033[32m1\033[0m] : Start The Bot
[\033[32m2\033[0m] : Manual Input
quit : close the program
""")
if len(sys.argv) > 1:
if sys.argv[1] == "-e":
print("listening on account: " + user + '... (Ctrl C or close window to quit')
read_emails()
elif sys.argv[1] == "-m":
manual_input()
else:
menu()
else:
menu()