1
0
mirror of git://jb55.com/damus synced 2024-09-28 16:00:43 +00:00

script: fetch popular users

This commit is contained in:
William Casarin 2023-05-24 18:26:18 -07:00
parent 1769b08147
commit 52ca33ef6a

8
devtools/fetch-popular-users Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
curl $(curl -s 'https://storage.googleapis.com/storage/v1/b/nostrdb-backups/o?prefix=ndjson' | jq -r '.items | last | .mediaLink') > nostr-directory.json
jq -rc '.data | {url: .profileImageUrl, pk: .hexPubKey, userName: .userName, twitterFollowers: .user.followers_count, nostrFollowers: .nFollowerCount}' nostr-directory.json | jq -cs 'sort_by(.twitterFollowers + .nostrFollowers) | .[]' | tail -n1000 | tac > popular_users.json
printf "saved popular_users.json\n" >&2