1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #!/bin/bash
- BASEDIR=/home/themusicgod1
- DBDIR=/home/themusicgod1/TDL
- # 0. generate databases.db
- # 1.
- #sqlite3 database.db -line "select url from statuses;" | grep url | awk -F' ' '{print $3}'| awk -F'/' '{print $2"@" $1}' | sort | uniq > users.txt
- # get users script in aspublic
- # 2. move users to eva
- # 3.
- cat users.txt | grep -iv '@.*@.*' > users_malformatted.txt
- # 4.
- cat users_malformatted.txt | awk -F' ' '{print "@"$1}' >> users2.txt
- cat users.txt | grep -i '@.*@.*' >> users2.txt
- mv users2.txt users.txt
- for x in `cat users.txt`; do howFar.sh $x | grep -i update | grep -iv 'insert' | grep -iv '@'; done;
- #these i think can be just dropped in, no harm if they are dupes
- echo "done. press enter or something";
- read ;
- for x in `cat users.txt`; do LINEME=`howFar.sh $x | grep -i insert `; echo $LINEME; sqlite3 ~/TDL/urls.db -line "$LINEME"; done
- #what we should do next is do some kind of error checking instead of sleep here - print OK if success
- #todo: make this dependent on max value
- #or make it 100?
- MAXLEVEL=`grep -i "maximum" $BASEDIR/tools/grabLaundry.sh | awk -F' ' '{print $3}' | awk -F')' '{print $1}'`".0"
- echo "selecting url from news where level > $MAXLEVEL; ..."
- sqlite3 $DBDIR/urls.db -line "select url from news where level > $MAXLEVEL;"
- echo "put that into followme.txt"
- #we shoudl automate this
- # should print out the username of anyone this fails with in a greppable way
- # there's an issue in this with spc deal with spc users
- echo "when done. press enter or something";
- read ;
- for x in `cat followme.txt`; do echo $x; toot follow $x; sleep 2; done;
- check_for_banned_from_spc.sh
- echo "delete from news where level > $MAXLEVEL;"
|