# 1. Get gchange in-friends list
# 2. Read gchange+ message from them and find their IPFS tryme address
# 3. Compare with out-friends list and add their address to bootstrap, connect swarm peers
# 4. Send message to not yet in-friends to install Astroport.
This commit is contained in:
qo-op 2020-12-02 15:18:00 +01:00
parent 4ac5123c58
commit fca5581679
1 changed files with 8 additions and 22 deletions

View File

@ -14,14 +14,14 @@ ME="${0##*/}"
############# '$MY_PATH/$ME' ############# '$MY_PATH/$ME'
######################################################################## ########################################################################
# ex: ./'$ME' # ex: ./'$ME'
# GET SSB FRIENDS AND FIND THEIR IPFS ID TO "ipfs swarm connect" THEM # GET GCHANGE FRIENDS AND FIND THEIR IPFS ID TO "ipfs swarm connect" THEM
########################################################################' ########################################################################'
## TODO: REMOVE DUPLICATES ## TODO: REMOVE DUPLICATES
## TODO: MODE : COOL, STRAIGHT, ARMORED ## TODO: MODE : COOL, STRAIGHT, ARMORED
######################################################################## ########################################################################
## CONNECT GLOBAL "ipfs.io" ## DANGEROUS only for short time... ## CONNECT GLOBAL "ipfs.io" ## DANGEROUS DATA LEAK only for short time...
######################################################################## ########################################################################
# ADD ipfs.io public bootstrap into your swarm peers # ADD ipfs.io public bootstrap into your swarm peers
# RUN: cat ~/.zen/astroport/ipfs.swarm.ipfs.io | ipfs swarm connect # RUN: cat ~/.zen/astroport/ipfs.swarm.ipfs.io | ipfs swarm connect
@ -36,25 +36,11 @@ IPFSNODEID=$(ipfs id -f='<id>\n')
[[ $IPFSNODEID == "" ]] && echo "ERROR missing IPFS Node id !! IPFS is not installed !?" && exit 1 [[ $IPFSNODEID == "" ]] && echo "ERROR missing IPFS Node id !! IPFS is not installed !?" && exit 1
######################################################################## ########################################################################
echo ' #TODO:
__ __ ____ # 1. Get gchange in-friends list
__/ // /_______ ______ __________ ___ / __ \ # 2. Read gchange+ message from them and find their IPFS tryme address
/_ _ __/ ___/ | /| / / __ `/ ___/ __ `__ \/ / / / # 3. Compare with out-friends list and add their address to bootstrap, connect swarm peers
/_ _ __(__ )| |/ |/ / /_/ / / / / / / / / /_/ / # 4. Send message to not yet in-friends to install Astroport.
/_//_/ /____/ |__/|__/\__,_/_/ /_/ /_/ /_/\____/
EXTEND IPFS SWARM and SHAPE IT FROM (ssb_INIT.sh) FRIENDS
Search "ipfstryme" message type in SSB feed
'
[[ ! $WHOAMI ]] && WHOAMI=$($MY_PATH/tools/timeout.sh -t 3 sbotc whoami | jq -r .id)
########################################################################
# GET /tmp/ssb-friends.txt
sbotc query.read '{"query":[{"$filter":{"value":{"author": "'"$WHOAMI"'", "content":{"type":"contact"}}}}]}' | jq -r '.value?.content?.contact' > /tmp/ssb-friends.txt
# GET /tmp/ssb-NOTfriends.txt
sbotc links "{\"source\": \"${WHOAMI}\", \"rel\": \"contact\", \"values\": true, \"reverse\": true}" | jq -c . | grep 'blocking":true' | jq -r .dest > /tmp/ssb-NOTfriends.txt
count=1 count=1
######################################################################## ########################################################################
@ -63,7 +49,7 @@ count=1
echo "" > /tmp/This_NOTfriends_are_astroport echo "" > /tmp/This_NOTfriends_are_astroport
echo "" > /tmp/This_friends_connect_astroport echo "" > /tmp/This_friends_connect_astroport
echo "" > /tmp/This_friends_should_install_astroport echo "" > /tmp/This_friends_should_install_astroport
### TODO -> send sbotc message (private or zip attached?) with this reports ### TODO -> send gchange message (private or zip attached?) with this reports
for SSBFRIEND in $(uniq /tmp/ssb-friends.txt); do for SSBFRIEND in $(uniq /tmp/ssb-friends.txt); do