diff --git a/tools/Connect_PLAYER_To_Gchange.sh b/tools/Connect_PLAYER_To_Gchange.sh
index 0aa50498..a6825e42 100755
--- a/tools/Connect_PLAYER_To_Gchange.sh
+++ b/tools/Connect_PLAYER_To_Gchange.sh
@@ -54,7 +54,7 @@ if [[ ! -s ~/.zen/game/players/${PLAYER}/ipfs/cesium.json ]]; then
########################################################################
echo "${PLAYER} GCHANGE+ PROFILE https://gchange.fr"
- echo "set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}""
+ # echo "set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}""
########################################################################
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}" -s "https://ipfs.copylaradio.com/ipns/$ASTRONAUTENS" #GCHANGE+
[[ ! $? == 0 ]] && echo "GCHANGE PROFILE CREATION FAILED"
@@ -63,32 +63,36 @@ if [[ ! -s ~/.zen/game/players/${PLAYER}/ipfs/cesium.json ]]; then
########################################################################
echo "${PLAYER} CESIUM+ PROFILE https://demo.cesium.app/#/app/wot/lg?q=$G1PUB"
########################################################################
- $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://g1.data.presles.fr" set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}" --s "http://ipfs.localhost:8080/ipns/$ASTRONAUTENS" #CESIUM+
+ $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://g1.data.e-is.pro" set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}" --s "http://ipfs.localhost:8080/ipns/$ASTRONAUTENS" #CESIUM+
[[ ! $? == 0 ]] && echo "CESIUM PROFILE CREATION FAILED"
- ## GET IT BACK
- $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://g1.data.presles.fr" get > ~/.zen/game/players/${PLAYER}/ipfs/cesium.json
fi
+## GET PROFILE BACK
+$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" get > ~/.zen/game/players/${PLAYER}/ipfs/gchange.json
+$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://g1.data.e-is.pro" get > ~/.zen/game/players/${PLAYER}/ipfs/cesium.json
+
########################################################################
-echo "########################################################################"
-echo "SCANNING ${PLAYER} - $G1PUB - Gchange FRIENDS"
+echo "### ${PLAYER} ##########################################################"
+echo "SCANNING - $G1PUB Gchange FRIENDS"
echo "########################################################################"
################## CHECKING WHO GAVE ME STARS
################## BOOTSTRAP LIKES THEM BACK
################## SEND ipfstryme MESSAGES to FRIENDS
rm -f ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/my_star_level
## Getting Gchange liking_me list
-echo "Getting received stars"
+echo "Checking received stars"
################################## JAKLIS PLAYER stars
~/.zen/Astroport.ONE/tools/timeout.sh -t 20 \
~/.zen/Astroport.ONE/tools/jaklis/jaklis.py \
-k ~/.zen/game/players/${PLAYER}/secret.dunikey \
-n "https://data.gchange.fr" stars > ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json
+[[ ! $(cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json | jq -r '.likes[].issuer') ]] && echo "Niveau Ŋ0 - Activez le niveau de confiance Ŋ1" && exit 0
+
cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json | jq -r '.likes[].issuer' | sort | uniq > ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/liking_me
-echo "cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json | jq -r"
+# echo "cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json | jq -r" # DEBUG
for liking_me in $(cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/liking_me | sort | uniq);
do
diff --git a/tools/VISA.new.sh b/tools/VISA.new.sh
index b56cc04b..7caa2dfc 100755
--- a/tools/VISA.new.sh
+++ b/tools/VISA.new.sh
@@ -42,7 +42,7 @@ if [[ $SALT != "" && PEPPER != "" ]]; then
${MY_PATH}/keygen -t ipfs -o ~/.zen/tmp/${MOATS}/player.key "$SALT" "$PEPPER" 2>/dev/null
ASTRONAUTENS=$(ipfs key import ${MOATS} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/player.key 2>/dev/null)
- echo "/ipns/${ASTRONAUTENS}"
+ # echo "/ipns/${ASTRONAUTENS}"
ipfs key rm ${MOATS} 2>/dev/null ## CLEANING
@@ -50,12 +50,10 @@ if [[ $SALT != "" && PEPPER != "" ]]; then
## GETTING LAST TW via IPFS or HTTP GW
[[ $YOU ]] \
- && echo "ipfs --timeout 30s cat /ipns/${ASTRONAUTENS} > ~/.zen/tmp/${MOATS}/TW/index.html ($YOU)" \
- && ipfs --timeout 30s cat /ipns/${ASTRONAUTENS} > ~/.zen/tmp/${MOATS}/TW/index.html
+ && ipfs --timeout 20s cat /ipns/${ASTRONAUTENS} > ~/.zen/tmp/${MOATS}/TW/index.html
[[ ! -s ~/.zen/tmp/${MOATS}/TW/index.html ]] \
- && echo "TRYING $LIBRA/ipns/${ASTRONAUTENS}" \
- && curl -m 30 -so ~/.zen/tmp/${MOATS}/TW/index.html "$LIBRA/ipns/${ASTRONAUTENS}"
+ && curl -m 20 -so ~/.zen/tmp/${MOATS}/TW/index.html "$LIBRA/ipns/${ASTRONAUTENS}"
#############################################
## AUCUN RESULTAT
@@ -295,7 +293,7 @@ qrencode -s 12 -o "$HOME/.zen/game/players/$PLAYER/QR.ASTRONAUTENS.png" "https:/
echo; echo "Création de votre Clef et QR codes d'accès au niveau Astroport Ŋ1"; sleep 1
echo; echo "*** HOME : ~/.zen/game/players/$PLAYER/"; sleep 1
-echo "*** IPNS Ŋ0 KEY : $PLAYER";
+echo "*** PLAYER : $PLAYER";
echo; echo "GW : https://ipfs.copylaradio.com/ipns/${ASTRONAUTENS}"; sleep 1
# PASS CRYPTING KEY
diff --git a/tools/VOEUX.print.sh b/tools/VOEUX.print.sh
index c946ef07..443f9b3a 100755
--- a/tools/VOEUX.print.sh
+++ b/tools/VOEUX.print.sh
@@ -26,7 +26,7 @@ echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
## EXTRACT G1Voeu from PLAYER TW
echo "Exporting $PLAYER TW [tag[G1Voeu]]"
rm -f ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json
-tiddlywiki --load ${INDEX} --output ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu --render '.' "${PLAYER}.g1voeu.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[G1Voeu]]'
+tiddlywiki --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html --output ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu --render '.' "${PLAYER}.g1voeu.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[G1Voeu]]'
[[ ! -s ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json ]] && echo "AUCUN G1VOEU - EXIT -" && exit 1
@@ -36,8 +36,6 @@ echo "VOEUX : ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${PLAYER}.g1wishes.txt "
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
-exit
-
for v in $(cat ~/.zen/game/players/*/voeux/*/.title); do
g1pub=$(grep -r $v ~/.zen/game/players/*/voeux/ 2>/dev/null | rev | cut -d '/' -f 2 | rev )
# echo "$v : $g1pub"
diff --git a/tools/mailjet.sh b/tools/mailjet.sh
index 31cffc69..c8e58763 100755
--- a/tools/mailjet.sh
+++ b/tools/mailjet.sh
@@ -24,7 +24,7 @@ mail="$1" # EMAIL DESTINATAIRE
messfile="$2" # FICHIER A AJOUTER AU CORPS MESSAGE
SUBJECT="[(♥‿‿♥)] Station Astroport : $(hostname)"
-MESSAGE="( ◕‿◕)\n\n Bonjour $PLAYER\n\n\n REBOOT https://astroport.copylaradio.com .\n\nAstroport\n($IPFSNODEID)"
+MESSAGE="( ◕‿◕)\n\n Bonjour $PLAYER\n\n UN MESSAGE POUR VOUS.\n\nAstroport\n/ipns/$IPFSNODEID"
echo "
########################################################################
@@ -38,7 +38,7 @@ Bcc: support@qo-op.com
Subject: SUBJECT
MESSAGE
" > ~/.zen/tmp/email.txt
-[[ ! -s $messfile ]] && [[ $(file --mime-type -b $messfile) == 'text/plain' ]] && cat $messfile >> ~/.zen/tmp/email.txt
+[[ -s $messfile ]] && cat $messfile >> ~/.zen/tmp/email.txt
cat ~/.zen/tmp/email.txt | sed "s~EMAIL~${mail}~g" | sed "s~SUBJECT~${SUBJECT}~g" | sed "s~MESSAGE~${MESSAGE}~g" | ssmtp -v ${mail}