Skip to content

remynln/random_repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

random_repo

forthebadge forthebadge forthebadge

How to use it ?

  • First you need to create an oauth app here and a discord webhook Create app Create app create Webhook
  • When you did it open the script random_repo.sh and put in oauthid your oauth id and oauthsecret your oauth app scret Get id

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

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

About

A simple script to get a random repo from github

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages