This is a Python script that allows you to add random topics to a GitHub repository using the GitHub API.
- Clone this repository using :
git clone https://github.com/mishalhossin/github-topics-adder.git
- Change into the cloned directory using :
cd your_repository_name
- Install the required dependencies using :
pip install os random requests
- Replace
your_username
andyour_repository_name
with your actual GitHub username and repository name, respectively intopics_adder.py
- Set your GitHub access token as an environment variable named
ACCESS_TOKEN
. - Create a wordlist of topics in a file named
wordlist.txt
, with one topic per line. - Run the script using
python topics_adder.py
The script will select 20 random topics from your wordlist.txt
file, and add them to your repository's topics using the GitHub API. The topics will be added every 20 seconds until the script is terminated. (note : 20 is the max topics for githubrep)
The wordlist_validator.py
script can be used to validate the contents of your wordlist.txt
file. It will load the file, remove any special characters and spaces from each topic, and check if they are valid topics according to the GitHub API's naming conventions. It will then output the list of valid topics and overwrite your wordlist.txt
file with only the valid topics.
To use the wordlist_validator.py
script, simply run
python wordlist_validator.py
The script will output the list of valid topics to the console and overwrite your wordlist.txt
file with only the valid topics.