Last active
August 6, 2025 07:53
-
-
Save sneumann/acc940e86ca2a18cd67fd0943982ef5d to your computer and use it in GitHub Desktop.
Get number of NFDI4Chem.de followers on Bluesky (shell)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| did="did:plc:oxbo2ifc5i7shah4bvai2pbi" | |
| cursor="" | |
| total=0 | |
| while true; do | |
| url="https://public.api.bsky.app/xrpc/app.bsky.graph.getFollowers?actor=$did" | |
| if [ -n "$cursor" ]; then | |
| url="$url&cursor=$cursor" | |
| fi | |
| response=$(curl -s "$url") | |
| count=$(echo "$response" | jq '.followers | length') | |
| total=$((total + count)) | |
| cursor=$(echo "$response" | jq -r '.cursor // empty') | |
| [ -z "$cursor" ] && break | |
| done | |
| echo "Total followers: $total" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment