updated with comments for changes
parent
4281cdd8b8
commit
e7aaa1d601
|
@ -32,6 +32,12 @@ def randomName():
|
||||||
return( random.choice(usernames) )
|
return( random.choice(usernames) )
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
# 1. Prompt for user name / password (ask for it as a CLI argument?)
|
||||||
|
# 2. login as admin
|
||||||
|
# 3. Change all the tootctl lines to create_account()
|
||||||
|
# 4. Pass to_file to create_account() to write the client secrets to .tootapalooza-usercred...
|
||||||
|
# 5. Write username/pass/name to users.toml
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Create random users for tootapalooza"
|
description="Create random users for tootapalooza"
|
||||||
)
|
)
|
||||||
|
@ -78,7 +84,7 @@ def main():
|
||||||
emailaddr = "{}+tooter_{}_{}@{}".format(mailbox, userid.split('_')[1],
|
emailaddr = "{}+tooter_{}_{}@{}".format(mailbox, userid.split('_')[1],
|
||||||
userid.split('_')[2], emailDomain )
|
userid.split('_')[2], emailDomain )
|
||||||
password = None
|
password = None
|
||||||
|
# ---- Nick start here
|
||||||
# Inherit current running environment
|
# Inherit current running environment
|
||||||
myenv=os.environ.copy()
|
myenv=os.environ.copy()
|
||||||
# make sure the rails_env is set
|
# make sure the rails_env is set
|
||||||
|
@ -119,7 +125,7 @@ def main():
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
print(f"Calling {tootctlprog} failed:", e, file=sys.stderr)
|
print(f"Calling {tootctlprog} failed:", e, file=sys.stderr)
|
||||||
sys.exit(3)
|
sys.exit(3)
|
||||||
|
# Nick stop here
|
||||||
entry = {}
|
entry = {}
|
||||||
entry["addr"] = emailaddr
|
entry["addr"] = emailaddr
|
||||||
entry["pass"] = password
|
entry["pass"] = password
|
||||||
|
|
Loading…
Reference in New Issue