~kris/dots

srice

ref: e9b48d06a8541f3eda5c4db90382ab3c77183afb srice/.local/bin/srht-repos -rwxr-xr-x 406 bytes
e9b48d06 — Kris Yotam xprofile: systemd-aware pipewire start + blueman-applet; sb-internet: tolerate missing /proc/net/wireless 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
#!/bin/sh
# srht-repos -- list all sr.ht repositories
set -eu

TOKEN=$(cat ~/.config/srht/token)

curl -s --oauth2-bearer "$TOKEN" -H 'Content-Type: application/json' \
  -d '{"query": "{ me { repositories { results { name visibility description updated } cursor } } }"}' \
  https://git.sr.ht/query | jq -r '.data.me.repositories.results[] | "\(.name)\t\(.visibility)\t\(.description // "")"' | column -t