From ecfa63be8388b14d1c1ff10971514037733f14d2 Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 25 Apr 2024 12:01:12 +0200 Subject: [PATCH] 12:01 --- ASTROBOT/_ForkUPlanetZERO.sh | 22 +++++++++------------- _12345.sh | 7 ++++++- templates/UPlanetSector/index.html | 2 +- templates/UPlanetUmap/index.html | 2 +- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/ASTROBOT/_ForkUPlanetZERO.sh b/ASTROBOT/_ForkUPlanetZERO.sh index 4fcc6de0..765687e0 100755 --- a/ASTROBOT/_ForkUPlanetZERO.sh +++ b/ASTROBOT/_ForkUPlanetZERO.sh @@ -12,15 +12,11 @@ ME="${0##*/}" ## IT SEARCH FOR CURRENT TW ForkUPlanetZERO tag ## IT MAKES $HOME/.zen/game/players/${PLAYER}/.ipfs/${UPNAME}.swarm.key ## IT CHECKS FOR SAME UPNAME WISH IN FRIENDS TW -echo "(✜‿‿✜) CURRENT Fork UPlanet -This wish makes Player generate or join a private IPFS swarm -It can be use to populate UPlanet ZERO (or not) -All friends with the same wish will share the SECRET -then any can activate a new ipfs daemon connected to that private ZONE -Planet shape could be define from text found in command tiddler -and initiale new euclidian geokeys... -Default : -floating points" +#~ echo "(✜‿‿✜) CURRENT Fork UPlanet +#~ This program makes Player generate or join a private IPFS swarm +#~ All friends with the same wish will share the SECRET +#~ then any can activate a new ipfs daemon connected to that private ZONE +## TIDDLER can contain parameters for UPlanet activation echo "$ME RUNNING" @@ -103,12 +99,12 @@ IN16=$(cat ${JSONUPLANET} | jq -r '."${PLAYER}"') if [[ ${IN16} == "" || ${IN16} == "null" ]]; then echo "NO SECRET FOUND" \ - && echo "NEW SECRET SWARM.KEY GENERATION" \ + && echo ">> 🔑 ${UPNAME} SECRET SWARM.KEY GENERATION 🔑" \ && cat $HOME/.zen/tmp/${MOATS}/swarm.key \ && cp $HOME/.zen/tmp/${MOATS}/swarm.key $HOME/.zen/game/players/${PLAYER}/.ipfs/${UPNAME}.swarm.key \ && echo "------- KEY LOADED -----> ${PLAYER}/.ipfs/${UPNAME}.swarm.key" - ## THIS IS A PRIMAL WISH + ## THIS IS A PRIMAL TIDDLER else @@ -125,7 +121,7 @@ else ## CHEK KEY WITH ACTUAL ONE [[ $(diff ~/.zen/tmp/${MOATS}/swarmkey.decrypted $HOME/.zen/game/players/${PLAYER}/.ipfs/${UPNAME}.swarm.key) ]] \ - && echo "- WARNING - UPDATING ${UPNAME}.swarm.key ..." && ERR="TW SWARM CHANGED" + && echo "- 📸 WARNING 📸 - UPDATING ${UPNAME}.swarm.key ..." && ERR="TW SWARM CHANGED" ## UPDATE PLAYER LOCAL SWARMKEY FROM VALUE FOUND IN HIS OWN WISH TIDDLER ! [[ -s ~/.zen/tmp/${MOATS}/swarmkey.decrypted ]] \ @@ -143,7 +139,7 @@ ${MY_PATH}/../tools/natools.py encrypt \ -o $HOME/.zen/game/players/${PLAYER}/.ipfs/${UPNAME}.swarm.key.enc ENCODING=$(cat $HOME/.zen/game/players/${PLAYER}/.ipfs/${UPNAME}.swarm.key.enc | base16) rm $HOME/.zen/game/players/${PLAYER}/.ipfs/${UPNAME}.swarm.key.enc -echo "==> base16 ${PLAYER} encrypted swarm.key" +echo "==> base16 ${PLAYER} encrypted swarm.key is secret" #~ echo "${SECRET}" #~ echo "${ENCODING}" diff --git a/_12345.sh b/_12345.sh index 97cf5c23..561eeb0c 100755 --- a/_12345.sh +++ b/_12345.sh @@ -198,7 +198,12 @@ while true; do for znod in $(cat ~/.zen/tmp/_swarm.${ipfsnodeid}); do # CHECK znod validity cznod=$(${MY_PATH}/tools/ipfs_to_g1.py ${znod} 2>/dev/null) - [[ ${cznod} == "" || ${cznod} == "null" ]] && echo "xxxxxxxxxxxx BAD ${znod} xxxx ON xxxxxx ${ipfsnodeid} - ERROR - CONTINUE" && continue + [[ ${cznod} == "" || ${cznod} == "null" ]] \ + && echo "xxxxxxxxxxxx BAD ${znod} xxxx ON xxxxxx ${ipfsnodeid} - ERROR - CONTINUE" \ + && continue + [[ ${cznod} == ${IPFSNODEID} ]] \ + && echo "IPFSNODEID MIRROR ME" + && continue echo "REFRESHING MY SWARM DATA WITH ZNOD=${znod}" mkdir -p ~/.zen/tmp/swarm/${znod} diff --git a/templates/UPlanetSector/index.html b/templates/UPlanetSector/index.html index ae29ed0f..51004e28 100644 --- a/templates/UPlanetSector/index.html +++ b/templates/UPlanetSector/index.html @@ -141,7 +141,7 @@ iframe {
-
<<< (◕‿‿◕) <<< _DATE_ +
<<< (◕‿‿◕) <<< _DATE_

_ZONE_

"Sector Exploration"

diff --git a/templates/UPlanetUmap/index.html b/templates/UPlanetUmap/index.html index 5e2c12f3..8656e171 100644 --- a/templates/UPlanetUmap/index.html +++ b/templates/UPlanetUmap/index.html @@ -134,7 +134,7 @@ iframe {
-
<<< (◕‿‿◕) <<< _DATE_ +
<<< (◕‿‿◕) <<< _DATE_

_ZONE_

(✜) "UPlanet Registration" (✜)