Shellskript zur Ermittlung der Follower und Formatierung

This commit is contained in:
qbi 2023-01-01 23:55:18 +01:00
parent c6c7f4bb18
commit 0df842c173

16
get_follower.sh Normal file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env sh
FLIST=Downloads/following-2023-01-01-10-41-58.csv
FURL=""
FFILE="$(date +%F)"
touch $FFILE
# Preprocessing
#echo "qbi@mastodon.social\nmaxschrems@mastodon.social" >> $FLIST
sed -i.1 '/@a.gup.pe/d' $FLIST
while read account; do
FURL=$(echo $account | sed 's,^\(.*\)@\(.*\),\2/users/\1/followers,')
NFOL=$(curl -Ls -H 'Accept: application/activity+json' $FURL | jq .totalItems)
echo "@$account ($NFOL)" >> $FFILE
done < $FLIST