- First you need to create an oauth app here and a discord webhook
- When you did it open the script random_repo.sh and put in
oauthid
your oauth id andoauthsecret
your oauth app scret
it should look like this
#!/bin/bash
authid="yourid"
authsecret="yoursecret"
webhook_url="your discord webhook url"
...
If you want a random repository every hour do this:
$ crontab -e
0 * * * * path_to_the_script/random_repo.sh >> .repo_log.txt
- Now you need to install dependencies:
- Ubuntu and other apt:
$sudo apt-get install jq
- Fedora and other dnf:
$sudo dnf install jq
- Arch and other pacman/yay:
$sudo pacman -Syu jq or $sudo yay jq
- If your distrib is'nt here go check this link
- Ubuntu and other apt:
The goal of the oauth it's not to be rate limit after 5 minutes of utilisations. You have 60 requests per hour without oauth and with oauth connection you have 5,000 requests (source)
Now just launch the script and voila !
(sometimes it takes a little while, that nothing, probably a thing called optimisation but I don't know how it works)
Why did I did this script ? and why in bash and not other language ? I don't know a damn thing about it, but leave me in my madness