diff --git a/ASTROBOT/G1Voeu.sh b/ASTROBOT/G1Voeu.sh index 9ce5ebec7..0cc597dba 100755 --- a/ASTROBOT/G1Voeu.sh +++ b/ASTROBOT/G1Voeu.sh @@ -22,12 +22,12 @@ PSEUDO=$(cat ~/.zen/game/players/$PLAYER/.pseudo 2>/dev/null) [[ $G1PUB == "" ]] && G1PUB=$(cat ~/.zen/game/players/$PLAYER/.g1pub 2>/dev/null) [[ $G1PUB == "" ]] && echo "Troisième paramètre G1PUB manquant" && exit 1 -[[ ! $INDEX ]] && echo "MISSING ASTRONAUTE TW index.html" && exit 1 +[[ ! $INDEX ]] && echo "MISSING ASTRONAUTE TW index.html - EXIT -" && exit 1 echo "Working on $INDEX" ASTRONAUTENS=$(ipfs key list -l | grep -w "${PLAYER}" | cut -d ' ' -f 1) -[[ $ASTRONAUTENS == "" ]] && echo "ASTRONAUTE manquant" && exit 1 +[[ $ASTRONAUTENS == "" ]] && echo "CLEF IPNS ASTRONAUTE MANQUANTE - EXIT -" && exit 1 echo "Bienvenue $PSEUDO ($PLAYER) : $G1PUB" echo @@ -60,10 +60,10 @@ echo ## TEST IPFS ipfs --timeout=6s cat /ipns/$VOEUNS > ~/.zen/tmp/$VOEUNS.html - [[ -s ~/.zen/tmp/$VOEUNS.html ]] && echo "HEY !!! OH !! CE VOEUX EXISTE ! ~/.zen/tmp/$VOEUNS.html " && exit 1 + [[ -s ~/.zen/tmp/$VOEUNS.html ]] && echo "HEY !!! UN TW EXISTE POUR CE VOEU ! ~/.zen/tmp/$VOEUNS.html - EXIT -" && exit 1 ## WORLD TEST TEST=$(cat ~/.zen/game/world/*/.pepper 2>/dev/null | grep -w "$PEPPER") - [[ $TEST ]] && echo "HEY !!! OH !! CE VOEUX $PEPPER EXISTE DANS VOTRE MONDE ! $TEST " && exit 1 + [[ $TEST ]] && echo "HEY !!! OH !! VOEU $PEPPER DANS VOTRE MONDE ! $TEST - EXIT -" && exit 1 # CRYPTO BUG. TODO use natools to protect and share key with Ŋ1 only ;) myIP=$(hostname -I | awk '{print $1}' | head -n 1) diff --git a/ASTROBOT/PLAYER.refresh.sh b/ASTROBOT/PLAYER.refresh.sh index 56f187204..58b2274d7 100755 --- a/ASTROBOT/PLAYER.refresh.sh +++ b/ASTROBOT/PLAYER.refresh.sh @@ -63,7 +63,7 @@ for PLAYER in $(ls ~/.zen/game/players/); do tiddlywiki --load ~/.zen/tmp/astro/index.html --output ~/.zen/tmp --render '.' 'miz.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'MadeInZion' OLDIP=$(cat ~/.zen/tmp/miz.json | jq -r .[].secret) # FIRST TIME PLAYER TW USING GATEWAY - [[ $OLDIP == "_SECRET_" ]] && sed -i "s~_SECRET_~${myIP}~g" ~/.zen/tmp/astro/index.html && OLDIP=$myIP + [[ $OLDIP == "_SECRET_" ]] && echo "_SECRET_ TW" && sed -i "s~_SECRET_~${myIP}~g" ~/.zen/tmp/astro/index.html && OLDIP=$myIP # AM I MANAGING TW [[ $OLDIP != $myIP ]] && echo "ASTRONAUTE GATEWAY IS http://$OLDIP:8080/ipns/$ASTRONAUTENS - BYPASSING -" && continue ############################################################# diff --git a/ASTROBOT/VOEUX.create.sh b/ASTROBOT/VOEUX.create.sh index 16ff38207..d4f6f4fed 100755 --- a/ASTROBOT/VOEUX.create.sh +++ b/ASTROBOT/VOEUX.create.sh @@ -25,7 +25,8 @@ ASTRONAUTENS=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f1) myIP=$(hostname -I | awk '{print $1}' | head -n 1) ## EXPORT [tag[voeu]] -echo "## EXPORT FROM $PLAYER TW [tag[voeu]] $INDEX" +echo "## EXTRACTION DE NOUVEAUX VOEUX pour $PLAYER TW" +echo "$INDEX [tag[voeu]] ?" rm -f ~/.zen/tmp/voeu.json tiddlywiki --load ${INDEX} --output ~/.zen/tmp --render '.' 'voeu.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[voeu]]' @@ -34,11 +35,11 @@ tiddlywiki --load ${INDEX} --output ~/.zen/tmp --render '.' 'voeu.json' 'text/pl ## Tous les tiddlers comportant le tag "voeu" lancent la création d'un G1VOEU ayant le titre du Voeu comme génrateur de clef TW (pepper). for VOEU in "$(cat ~/.zen/tmp/voeu.json | jq -r '.[].title')" do - [[ ! $VOEU ]] && echo "NO NAME" && continue - echo "Detected $VOEU" + [[ ! $VOEU ]] && echo "AUCUN VOEU" && continue + echo "NOUVEAU $VOEU" VOEU=$(echo "$VOEU" | sed -r 's/\<./\U&/g' | sed 's/ //g') # CapitalGluedWords - echo "Creating G1$VOEU TW" + echo "CREATION G1Voeu G1$VOEU" ~/.zen/Astroport.ONE/ASTROBOT/G1Voeu.sh "$VOEU" "$PLAYER" "$INDEX" done diff --git a/tools/VISA.new.sh b/tools/VISA.new.sh index 5af0f20bb..7fb158e9f 100755 --- a/tools/VISA.new.sh +++ b/tools/VISA.new.sh @@ -16,7 +16,8 @@ PLAYER="$3" PSEUDO="$4" myIP=$(hostname -I | awk '{print $1}' | head -n 1) - +ASTRONAUTENS=$(ipfs key list -l | grep -w "${PLAYER}" | cut -d ' ' -f 1) +[[ $ASTRONAUTENS ]] && echo "IPNS $PLAYER EXISTANT http://$myIP:8080/$ASTRONAUTENS !! DO NOTHING - EXIT -" && exit 0 ## Chargement TW !!! if [[ $SALT != "" && PEPPER != "" ]]; then