~kris/dots

srice

ref: b42b72dc2648499470b89418ac629e40f41d3149 srice/.local/bin/srht-repos -rwxr-xr-x 406 bytes
b42b72dc — Kris Yotam sb-battery: match macsmc-battery by type, add low-battery dunst alerts; xprofile: caps:super 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