r/madeinpython • • 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.

See the project's GitHub here.

22 Upvotes

2 comments sorted by

3

u/Jac0b_0 Jun 27 '21

How are you running the script 24/7?

3

u/getmeright11 Jun 27 '21

It's looping every 5 seconds. The github is below (would appreciate if you gave me a star lol)

https://github.com/smfxfc/reddit-nickname-creator