mirror of
https://github.com/MichaByte/OnBoard-Live.git
synced 2025-12-06 08:13:41 -05:00
Restructure repo
This commit is contained in:
parent
65ddf2c73d
commit
ccdddb005d
21 changed files with 0 additions and 36 deletions
|
|
@ -1,3 +0,0 @@
|
||||||
# Review Helpers
|
|
||||||
|
|
||||||
This directory is a placeholder for future review automation tools!
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# Stream utilities
|
|
||||||
|
|
||||||
In this folder, you'll find all the scripts, tools, and programs that are needed to operate the OnBoard Live stream.
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
import secrets
|
|
||||||
import requests
|
|
||||||
import pickle
|
|
||||||
|
|
||||||
users = {}
|
|
||||||
|
|
||||||
with open('users.dat', 'rb') as f:
|
|
||||||
users = pickle.load(f)
|
|
||||||
|
|
||||||
def add_stream(stream):
|
|
||||||
requests.post('http://127.0.0.1:9997/v3/config/paths/add/' + stream, json={'name': stream})
|
|
||||||
|
|
||||||
def main():
|
|
||||||
print(users)
|
|
||||||
for user in users.values():
|
|
||||||
add_stream(user)
|
|
||||||
while True:
|
|
||||||
new_user = input('Enter new user\'s Slack ID: ')
|
|
||||||
if new_user in users:
|
|
||||||
print('User already exists.')
|
|
||||||
continue
|
|
||||||
users[new_user] = secrets.token_hex(32)
|
|
||||||
print(users[new_user])
|
|
||||||
add_stream(users[new_user])
|
|
||||||
with open('users.dat', 'wb') as f:
|
|
||||||
pickle.dump(users, f)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue