Skip to content

Instantly share code, notes, and snippets.

@genbtc
Created January 13, 2023 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save genbtc/bca83bb458b4ff1f03349508aae23347 to your computer and use it in GitHub Desktop.
Save genbtc/bca83bb458b4ff1f03349508aae23347 to your computer and use it in GitHub Desktop.
github-beautiful.sh
#!/bin/bash
# Copyright 2023 genr8eofl @IRC/gentoo
# Fetch Github Repo Descriptions. Pre-reqs: bash / jq / (curl || gh)
while read REPO; do
#REPO="torvalds/linux" #test
API="https://api.github.com/"
#DESC=$(curl -s "${API}/repos/${REPO}" | jq '.description') # rate limited
DESC=$(gh api "/repos/${REPO}" | jq '.description') # need GITHUB_TOKEN
GH="https://github.com/"
echo "${GH}${REPO} - ${DESC}"
done < ~/github.com-links-2-repos.txt #list of repos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment