From d87550beb07278e0fce6b35d026d091a36021292 Mon Sep 17 00:00:00 2001 From: fred Date: Sat, 7 Oct 2023 15:58:55 +0200 Subject: [PATCH] My TiddlyWiki on Astroport --- RUNTIME/PLAYER.refresh.sh | 3 ++- RUNTIME/VISA.new.sh | 7 ++++++- RUNTIME/VOEUX.refresh.sh | 2 +- tools/Connect_PLAYER_To_Gchange.sh | 10 +++++++++- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/RUNTIME/PLAYER.refresh.sh b/RUNTIME/PLAYER.refresh.sh index 99bd38873..98f477c04 100755 --- a/RUNTIME/PLAYER.refresh.sh +++ b/RUNTIME/PLAYER.refresh.sh @@ -80,8 +80,9 @@ for PLAYER in ${PLAYERONE[@]}; do echo "/ipns/${ASTRONAUTENS} ON $LIBRA" ## IPFS / HTTP / LOCAL + #~ DISABLED || curl -m 60 -so ~/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html "$LIBRA/ipns/${ASTRONAUTENS}" \ + ipfs --timeout 360s get -o ~/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html /ipns/${ASTRONAUTENS} \ - || curl -m 60 -so ~/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html "$LIBRA/ipns/${ASTRONAUTENS}" \ || cp ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html ~/.zen/tmp/${IPFSNODEID}/TW/${PLAYER}/index.html ## PLAYER TW IS ONLINE ? diff --git a/RUNTIME/VISA.new.sh b/RUNTIME/VISA.new.sh index 49ac1ab05..17f1c8ed1 100755 --- a/RUNTIME/VISA.new.sh +++ b/RUNTIME/VISA.new.sh @@ -69,7 +69,10 @@ if [[ $SALT != "" && PEPPER != "" ]]; then #~ echo "CREATION TW Astronaute" ## Nouveau Compte Astronaute #~ echo #~ echo "***** Activation du Canal TW Astronaute ${PLAYER} *****" - cp ${MY_PATH}/../templates/twdefault.html ~/.zen/tmp/${MOATS}/TW/index.html + + [[ ${LON} && ${LAT} ]] \ + && cp ${MY_PATH}/../templates/minimal.html ~/.zen/tmp/${MOATS}/TW/index.html \ + || cp ${MY_PATH}/../templates/twdefault.html ~/.zen/tmp/${MOATS}/TW/index.html else ############################################# @@ -109,6 +112,8 @@ fi ################################################################################ TWMODEL="/ipfs/bafybeiaaf52awrqliwn5mqleua6tcv4qv5oxjfa6j2web6nh42vzdtjkiu" # ipfs cat $TWMODEL > templates/twdefault.html +MINIMAL="/ipfs/bafybeidgyo756zmsltbq5ptxjdn2spncv5pccn6vxes3j7cqubqlohjr2e" +# ipfs cat $MINIMAL > templates/minimal.html ##################################################### # NEW PLAYER ############### ################################################################################ #~ echo "============================================= diff --git a/RUNTIME/VOEUX.refresh.sh b/RUNTIME/VOEUX.refresh.sh index 7b0d4acaa..74f21c076 100755 --- a/RUNTIME/VOEUX.refresh.sh +++ b/RUNTIME/VOEUX.refresh.sh @@ -38,7 +38,7 @@ INDEX="$3" mkdir -p ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu ## PROTOCOL EVOLUTION RUN & REMOVE -rm -Rf -p ~/.zen/tmp/${IPFSNODEID}/${PLAYER} +rm -Rf ~/.zen/tmp/${IPFSNODEID}/${PLAYER} ############################### diff --git a/tools/Connect_PLAYER_To_Gchange.sh b/tools/Connect_PLAYER_To_Gchange.sh index 219e9deed..03db31f06 100755 --- a/tools/Connect_PLAYER_To_Gchange.sh +++ b/tools/Connect_PLAYER_To_Gchange.sh @@ -1,5 +1,13 @@ #!/bin/bash -# Run After PLAYER.entrance.sh +################################################################################ +# Author: Fred (support@qo-op.com) +# Version: 0.1 +# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) +################################################################################ +# Takes care of analysing GChange+ Pod key and stars relations +################################################################################ +# TODO: could make better ES stars requests +# https://forum.monnaie-libre.fr/t/proposition-damelioration-de-gchange/1940/49 ################################################################################ MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized