From a443f0ff5bc69e23812633a3cc6e831d743e7a15 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 31 Mar 2024 14:39:50 +0200 Subject: [PATCH] refresh ~/.zen/tmp/$IPFSNODEID after 20H12 --- 20h12.process.sh | 2 ++ RUNTIME/PLAYER.refresh.sh | 24 +++++++++++++++--------- ajouter_media.sh | 13 +++++++++---- command.sh | 4 ++-- templates/UPlanetDAY2/index.html | 4 ++-- 5 files changed, 30 insertions(+), 17 deletions(-) diff --git a/20h12.process.sh b/20h12.process.sh index f45e917f..cca361aa 100755 --- a/20h12.process.sh +++ b/20h12.process.sh @@ -94,10 +94,12 @@ ${MY_PATH}/RUNTIME/NODE.refresh.sh ##################################### ## REMOVE TMP BUT KEEP swarm, flashmem and coucou +mv ~/.zen/tmp/${IPFSNODEID} ~/.zen/${IPFSNODEID} mv ~/.zen/tmp/swarm ~/.zen/swarm mv ~/.zen/tmp/coucou ~/.zen/coucou mv ~/.zen/tmp/flashmem ~/.zen/flashmem rm -Rf ~/.zen/tmp/* +mv ~/.zen/${IPFSNODEID} ~/.zen/tmp/${IPFSNODEID} mv ~/.zen/swarm ~/.zen/tmp/swarm mv ~/.zen/coucou ~/.zen/tmp/coucou mv ~/.zen/flashmem ~/.zen/tmp/flashmem diff --git a/RUNTIME/PLAYER.refresh.sh b/RUNTIME/PLAYER.refresh.sh index 24cd1ea9..c2ba127d 100755 --- a/RUNTIME/PLAYER.refresh.sh +++ b/RUNTIME/PLAYER.refresh.sh @@ -164,6 +164,8 @@ for PLAYER in ${PLAYERONE[@]}; do && msg="${PLAYER} MadeInZion : BAD TW (☓‿‿☓) " && err="(☓‿‿☓)" && player="" \ || player=$(cat ~/.zen/tmp/${MOATS}/MadeInZion.json | jq -r .[].player) + lang=$(cat ~/.zen/tmp/${MOATS}/MadeInZion.json 2>/dev/null | jq -r .[].dao) + [[ ${lang} == "null" ]] && lang="fr" ############################################################# ## CHECK "AstroID" Tiddler tiddlywiki --load ~/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html \ @@ -204,15 +206,6 @@ for PLAYER in ${PLAYERONE[@]}; do DIFF_SECONDS=$(( SNOW - SBIRTH )) days=$((DIFF_SECONDS / 60 / 60 / 24)) -################################################## +2 DAYS AstroID !! - ## REMOVE TW OLDER THAN 7 DAYS WITH AstroID - [[ -s ~/.zen/tmp/${MOATS}/AstroID.json && $days -gt 2 && "${CURRENT}" != "${PLAYER}" ]] \ - && ${MY_PATH}/PLAYER.unplug.sh "${HOME}/.zen/game/players/${PLAYER}/ipfs/moa/index.html" "${PLAYER}" "ALL" \ - && echo "(#__#) AstroID +7 DAYS = SECURITY ERROR (#__#)" && continue - - [[ $days -eq 2 ]] \ - && echo "DAY 2" \ - && ################################################## ANOTHER ASTROPORT !! IPNSTAIL=$(echo ${ASTROPORT} | rev | cut -f 1 -d '/' | rev) # Remove "/ipns/" part ########### ASTROPORT is not IPFSNODEID => EJECT TW @@ -228,6 +221,19 @@ for PLAYER in ${PLAYERONE[@]}; do echo "CURCHAIN=${CURCHAIN}" echo "================================== TW $days days old" +############################################## +2 DAYS & AstroID = UNPLUG !! + ## REMOVE TW OLDER THAN 2 DAYS WITH AstroID + [[ -s ~/.zen/tmp/${MOATS}/AstroID.json && $days -gt 2 && "${CURRENT}" != "${PLAYER}" ]] \ + && ${MY_PATH}/PLAYER.unplug.sh "${HOME}/.zen/game/players/${PLAYER}/ipfs/moa/index.html" "${PLAYER}" "ALL" \ + && echo "(#__#) AstroID +2 DAYS = SECURITY ERROR (#__#)" && continue + + #### SEND DAY2 ZINE + ZINE2="${MY_PATH}/../templates/UPlanetDAY2/index.${lang}.html" + [[ ! -s ${ZINE2} ]] && ZINE2="${MY_PATH}/../templates/UPlanetDAY2/index.html" + [[ $days -eq 2 ]] \ + && echo "ZINE2 DAY 2" \ + && ${MY_PATH}/../tools/mailjet.sh "${PLAYER}" ${ZINE2} "ZINE #2" + ###################################### #### UPLANET GEO COORD EXTRACTION ## GET "GPS" TIDDLER - 0.00 0.00 (if empty: null) diff --git a/ajouter_media.sh b/ajouter_media.sh index 5ef2279a..39ad4489 100755 --- a/ajouter_media.sh +++ b/ajouter_media.sh @@ -86,10 +86,15 @@ else fi +####### NO CURRENT ? PLAYER = .current +[[ ! -d $(readlink ~/.zen/game/players/.current) ]] \ + && rm -f ~/.zen/game/players/.current \ + && ln -s ~/.zen/game/players/${PLAYER} ~/.zen/game/players/.current + +echo "ADMIN : "$(cat ~/.zen/game/players/.current/.player) + [[ ${OUTPUT} != "" ]] \ -&& rm -f ~/.zen/game/players/.current \ -&& ln -s ~/.zen/game/players/$PLAYER ~/.zen/game/players/.current \ -&& espeak "CONNECTED" \ +&& espeak "${OUTPUT} CONNECTED" \ && . "${MY_PATH}/tools/my.sh" ## NO PLAYER AT ALL @@ -101,7 +106,7 @@ fi espeak "Hello $PSEUDO" -G1PUB=$(myPlayerG1Pub) +G1PUB=$(cat ~/.zen/game/players/${PLAYER}/.g1pub) [[ $G1PUB == "" ]] && espeak "ERROR NO G 1 PUBLIC KEY FOUND - EXIT" && exit 1 PLAYERNS=$(myPlayerNs) || { echo "noplayerns" && exit 1; } diff --git a/command.sh b/command.sh index 3eb413ec..7c6ba12f 100755 --- a/command.sh +++ b/command.sh @@ -103,8 +103,8 @@ done PLAYER=$fav ####### NO CURRENT ? PLAYER = .current -[[ ! -e ~/.zen/game/players/.current ]] \ - && rm ~/.zen/game/players/.current 2>/dev/null \ +[[ ! -d $(readlink ~/.zen/game/players/.current) ]] \ + && rm -f ~/.zen/game/players/.current \ && ln -s ~/.zen/game/players/${PLAYER} ~/.zen/game/players/.current pass=$(cat ~/.zen/game/players/$PLAYER/.pass 2>/dev/null) diff --git a/templates/UPlanetDAY2/index.html b/templates/UPlanetDAY2/index.html index bcb9aa00..43f578a7 100644 --- a/templates/UPlanetDAY2/index.html +++ b/templates/UPlanetDAY2/index.html @@ -21,7 +21,7 @@ href="/ipfs/QmeegmN4shouhnzvnDYpbSEJtdRsyy39SpL9XqYVHgtN44/style.css" />

TiddlyWiki

Welcome, Traveler, to the innovative world of TW5—a TiddlyWiki postit-based personal data store designed to empower you on your journey through UPlanet.

- +

🌐 online and 🌴 offline
✂️ cut 🙏 fold 📘 share 💜

@@ -78,7 +78,7 @@ href="/ipfs/QmeegmN4shouhnzvnDYpbSEJtdRsyy39SpL9XqYVHgtN44/style.css" /> -
Step 4: Customize your email Tiddler: Each traveler have a Tiddler within their TW5 titled with their email address. This serves as a unique signature—a digital calling card that identifies them across the cosmos. +