From fca55816790239eb760f360d2dfa38042a817494 Mon Sep 17 00:00:00 2001 From: qo-op Date: Wed, 2 Dec 2020 15:18:00 +0100 Subject: [PATCH] #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. --- zen/gchange_IPFS_swarm.sh | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/zen/gchange_IPFS_swarm.sh b/zen/gchange_IPFS_swarm.sh index d12f9ed..10892f7 100644 --- a/zen/gchange_IPFS_swarm.sh +++ b/zen/gchange_IPFS_swarm.sh @@ -14,14 +14,14 @@ ME="${0##*/}" ############# '$MY_PATH/$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: 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 # RUN: cat ~/.zen/astroport/ipfs.swarm.ipfs.io | ipfs swarm connect @@ -36,25 +36,11 @@ IPFSNODEID=$(ipfs id -f='\n') [[ $IPFSNODEID == "" ]] && echo "ERROR missing IPFS Node id !! IPFS is not installed !?" && exit 1 ######################################################################## -echo ' - __ __ ____ - __/ // /_______ ______ __________ ___ / __ \ - /_ _ __/ ___/ | /| / / __ `/ ___/ __ `__ \/ / / / -/_ _ __(__ )| |/ |/ / /_/ / / / / / / / / /_/ / - /_//_/ /____/ |__/|__/\__,_/_/ /_/ /_/ /_/\____/ - - -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 +#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. count=1 ######################################################################## @@ -63,7 +49,7 @@ count=1 echo "" > /tmp/This_NOTfriends_are_astroport echo "" > /tmp/This_friends_connect_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