1 # (c) 2014 Laura Arjona Reina (larjona@larjona.net)
2 # This script is in Public Domain
11 PF_SERVER
=pumprock.net
13 PF_COOKIE
= 'XXXXYYYYZZZ'
14 PF_WORKINGDIR
=/home
/username
/backups
/pumpfollowing
15 PF_DTE
=$
(date +%Y
%m
%d
)
17 ## END EDIT OPTIONS ##
20 touch $PF_SERVER_$PF_USER_following_$PF_DTE.txt
25 while [ $i -le $PF_TOTALMESSAGES ]
27 echo "wgetting $PF_COUNT items beginning with number $i..."
29 wget
-O "$PF_I.json" --no-cookies --header 'cookie: connect.sid=XXXXYYYYZZZZ' "https://$PF_SERVER/api/user/$PF_USER/following?count=$PF_COUNT&offset=$PF_I"
31 echo "extracting name of account for txt listing"
32 cat $PF_I.json |
tr ',' '\n' |
grep acct
-m 1 >> $PF_SERVER_$PF_USER_following_$PF_DTE.txt
34 PF_I
=`expr $PF_I + $PF_COUNT`
40 tar zcf ..
/$PF_SERVER_$PF_USER_following_$PF_DTE.
tar.gz
$PF_DTE/