-
Notifications
You must be signed in to change notification settings - Fork 0
/
osx_setup.py
executable file
·48 lines (40 loc) · 1.41 KB
/
osx_setup.py
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
import os
def main():
raw_input("This is a guide to do the things to get your bot set up. \
Press Enter ")
username = raw_input("What is your twitch username? \
Leave blank if you don't have one. Press Enter when you're done. ")
if username == "":
username = raw_input("Come on. Go to twitch.tv and make an account? \
Enter your username here when you're done. ")
oauth_password = raw_input("Go to http://twitchapps.com/tmi/ and authorize \
the application. Copy the entire oauth: portion, then paste it here and \
Press Enter ")
config_usernames = """
global config
username = '{username}'
oauth_password = '{oauth_password}'
channels_to_join = ['#{username}']
""".format(username=username, oauth_password=oauth_password)
config_text = """
for channel in channels_to_join:
channel = channel.lstrip('#')
config = {
'server': 'irc.twitch.tv',
'port': 6667,
'username': username,
# get this from http://twitchapps.com/tmi/
'oauth_password': oauth_password,
'debug': True,
'log_messages': True,
'channels': channels_to_join,
}
"""
os.system("cp globals_example.py globals.py")
with open("src/config/config.py", "w") as f:
f.write(config_usernames + config_text)
raw_input("Once you exit this script, install the dependencies with \
'sudo pip install -r requirements.txt' and run \
'./serve.py' Press Enter to quit ")
if __name__ == "__main__":
main()