From 964f9b443145099d1c0c847f971759d2642193fc Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 13 Dec 2022 23:33:28 +0100 Subject: [PATCH] =?UTF-8?q?(=E2=98=89=5F=E2=98=89=20)=20(=E2=98=89=5F?= =?UTF-8?q?=E2=98=89=20)=20(=E2=98=89=5F=E2=98=89=20)=20~/.zen/game/player?= =?UTF-8?q?s/$PLAYER/FRIENDS/index.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ASTROBOT/PLAYER.refresh.sh | 10 ++++++++++ tools/Connect_PLAYER_To_Gchange.sh | 15 ++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ASTROBOT/PLAYER.refresh.sh b/ASTROBOT/PLAYER.refresh.sh index fb4c34d8..60a96dbc 100755 --- a/ASTROBOT/PLAYER.refresh.sh +++ b/ASTROBOT/PLAYER.refresh.sh @@ -179,6 +179,16 @@ isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|( echo " = /ipfs/$TW" echo "================================================" +######################### PLAYER_feed + echo "(☉_☉ ) (☉_☉ ) (☉_☉ )" + echo "IFRIENDHEAD :" ${IFRIENDHEAD} + echo "(☉_☉ ) (☉_☉ ) (☉_☉ )" + # cp -f ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.rss.json ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/${FPLAYER}.rss.json + cat ${MY_PATH}/../www/iframe.html | sed "s~_IFRIENDHEAD_~${IFRIENDHEAD}~g" | sed "s~_ME_~${IPFSGW}/ipns/${ASTRONAUTENS}~g" > ~/.zen/game/players/$PLAYER/FRIENDS/index.html + + FRAME=$(ipfs add -Hq ~/.zen/game/players/$PLAYER/FRIENDS/index.html | tail -n 1) + ipfs name publish --allow-offline -t 24h --key="${PLAYER}_feed" /ipfs/$FRAME + done ################################################################# diff --git a/tools/Connect_PLAYER_To_Gchange.sh b/tools/Connect_PLAYER_To_Gchange.sh index 59ef26cf..88f37ba0 100755 --- a/tools/Connect_PLAYER_To_Gchange.sh +++ b/tools/Connect_PLAYER_To_Gchange.sh @@ -102,10 +102,10 @@ for liking_me in $(cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/liking_me | sort | uni do [[ "${liking_me}" == "" ]] && continue ## Protect from empty line !! echo "........................." - ASTRONAUTENS=$(~/.zen/Astroport.ONE/tools/g1_to_ipfs.py ${liking_me}) + FRIENDNS=$(~/.zen/Astroport.ONE/tools/g1_to_ipfs.py ${liking_me}) echo "===========================" echo "${liking_me} IS LIKING ME" - echo "TW ? http://tube.copylaradio.com:8080/ipns/$ASTRONAUTENS " + echo "TW ? https://ipfs.copylaradio.com/ipns/$FRIENDNS " ##### CHECKING IF WE LIKE EACH OTHER Ŋ1 LEVEL echo "Receiving Stars : cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/${liking_me}.Gstars.json | jq -r" @@ -148,17 +148,17 @@ do echo "Getting $FRIENDTITLE latest online TW..." YOU=$(ipfs swarm peers >/dev/null 2>&1 && echo "$USER" || ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1); LIBRA=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f 2) - echo "$LIBRA/ipns/$ASTRONAUTENS" - echo "http://$myIP:8080/ipns/$ASTRONAUTENS ($YOU)" - [[ $YOU ]] && ipfs --timeout 17s cat /ipns/$ASTRONAUTENS > ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html - [[ ! -s ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html ]] && curl -m 17 -so ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html "$LIBRA/ipns/$ASTRONAUTENS" + echo "$LIBRA/ipns/$FRIENDNS" + echo "http://$myIP:8080/ipns/$FRIENDNS ($YOU)" + [[ $YOU ]] && ipfs --timeout 17s cat /ipns/$FRIENDNS > ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html + [[ ! -s ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html ]] && curl -m 17 -so ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html "$LIBRA/ipns/$FRIENDNS" ## PLAYER TW EXISTING ? if [ ! -s ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html ]; then ## AUCUN VISA ASTRONAUTE ENVOYER UN MESSAGE PAR GCHANGE echo "AUCUN TW ACTIF. PREVENONS LE" - $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" send -d "${liking_me}" -t "HEY BRO !" -m ">>> (◕‿‿◕) <<< https://ipfs.copylaradio.com/ipns/$ASTRONAUTENS >>> (◕‿‿◕) <<< TW BunkerBOX : https://qo-op.com" + $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" send -d "${liking_me}" -t "HEY BRO !" -m ">>> (◕‿‿◕) <<< https://ipfs.copylaradio.com/ipns/$ASTRONAUTENS >>> (◕‿‿◕) <<< Mon TW BunkerBOX" else @@ -187,6 +187,7 @@ do ## TODO INSERT INTO $:/plugins/astroport/lightbeams/state/subscriptions export FRIENDSFEEDS="$ASTRONAUTEFEED\n$FRIENDSFEEDS" + export IFRIENDHEAD="$$FRIENDTITLE$IFRIENDHEAD" echo "APP=RSS : PLAYER FPLAYER RSS PUBLICATION READY" echo "~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/${FPLAYER}.rss.json"