Advertisement
Guest User

Import Mastodon follow into Pleroma

a guest
Apr 16th, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.54 KB | None | 0 0
  1. #USER and PASS are probably not necessary, KEY (pleroma cookie) certainly is, INSTANCE is your instance name :)
  2. #Rename your exported CSV list -> friends.csv
  3. USER=''
  4. PASS=''
  5. KEY=''
  6. INSTANCE=''
  7.  
  8. for i in $(cat friends.csv); do
  9.     echo -e "\nImporting user $i"
  10.     curl         --user $USER:$PASS --cookie "_pleroma_key=$KEY" "https://$INSTANCE/api/externalprofile/show.json?profileurl=$i"
  11.     curl -X POST --user $USER:$PASS --cookie "_pleroma_key=$KEY" "https://$INSTANCE/api/friendships/create.json?screen_name=$i"
  12.     sleep 1;
  13. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement