Browse Source

swarm of friends testing

pull/32/head
qo-op 6 months ago
parent
commit
bff9bee2dc
  1. 19
      zen/swarm_testing.sh

19
zen/swarm_testing.sh

@ -0,0 +1,19 @@
#!/bin/bash
if [[ $(date +%s -r /tmp/liking_me) -lt $(date +%s --date="1 day ago") ]]; then
echo "...... refreshing /tmp/liking_me"
~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars | jq -r '.likes[].issuer' > /tmp/liking_me
fi
for liking_me in $(cat /tmp/liking_me);
do
echo "$liking_me is liking me"
station=$(~/.zen/astrXbian/zen/tools/g1_to_ipfs.py $liking_me)
# ipfs --timeout=6s ls /ipns/$station
TEST=$(~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars -p $liking_me | jq -r '.yours.level')
if [ ! $TEST == 'null' ]; then
echo "$station is my friend"
ipfs --timeout=6s cat /ipns/$station/.$station/_xbian.zuid
[ ! $? == 0 ] && echo "UNAVAILABLE FRIEND $liking_me"
sleep 1
fi
done
Loading…
Cancel
Save