r/madeinpython • u/getmeright11 • Jun 26 '21
Python program that generates random nicknames for users who post or comment in /r/getnicknamed
Subreddit: r/getnicknamed
You can get your official nickname at /r/getnicknamed - it's a silly little project but I hope a few of you post/comment there to test it out.
My script uses 2 json files (one has a list of name prefixes, the other has a list of adjectives) to generate a random nickname.
Usernames are pulled from the subreddit's comments and submissions in a timed while loop. Usernames are then checked against the existing list of usernames to ensure no duplicates. Once the script verifies a new username, it generates a nickname for that user. Usernames and nicknames are stored in a dict, with username as the key and nickname as the value. This dict is also used to ensure no two users have the same nickname.
3
u/Jac0b_0 Jun 27 '21
How are you running the script 24/7?