From b9d1b5beff639d3e694695398d6c2675be1942f6 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 16 Apr 2023 20:44:29 +0200 Subject: [PATCH] UPDATE TW HPASS & PINNING IPFS MEDIA - PROOF OF COPY SYSTEM - --- ASTROBOT/G1PalPay.sh | 13 ++++++++++--- tools/VISA.new.sh | 11 ++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ASTROBOT/G1PalPay.sh b/ASTROBOT/G1PalPay.sh index 3c213280..7d73c32c 100755 --- a/ASTROBOT/G1PalPay.sh +++ b/ASTROBOT/G1PalPay.sh @@ -174,14 +174,16 @@ tiddlywiki --load $INDEX \ --render '.' "today.${PLAYER}.tiddlers.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[days:created[-1]]' ## FILTER MY OWN EMAIL -cat ~/.zen/game/players/${PLAYER}/G1CopierYoutube/${G1PUB}/today.${PLAYER}.tiddlers.json | jq -rc # LOG +# cat ~/.zen/game/players/${PLAYER}/G1CopierYoutube/${G1PUB}/today.${PLAYER}.tiddlers.json | jq -rc # LOG cat ~/.zen/game/players/${PLAYER}/G1CopierYoutube/${G1PUB}/today.${PLAYER}.tiddlers.json \ - | sed "s~${PLAYER}~ ~g" | jq -rc '.[] | select(.tags | contains("@"))' > ~/.zen/tmp/${MOATS}/@tags.json 2>/dev/null ## INLINE JSON + | sed "s~${PLAYER}~ ~g" | jq -rc '.[] | select(.tags | contains("@"))' > ~/.zen/tmp/${MOATS}/@tags.json 2>/dev/null ## REMOVE PLAYER EMAIL IN INLINE JSON [[ $? != 0 ]] && echo "NO EXTRA @tags.json TIDDLERS TODAY" && exit 0 +# LOG cat ~/.zen/tmp/${MOATS}/@tags.json + echo "******************TIDDLERS with EMAIL in TAGS treatment" #~ cat ~/.zen/game/players/${PLAYER}/G1CopierYoutube/${G1PUB}/${PLAYER}.tiddlers.json | sed "s~${PLAYER}~ ~g" | jq -rc '.[] | select(.tags | contains("@"))' > ~/.zen/tmp/${MOATS}/@tags.json @@ -194,6 +196,8 @@ while read LINE; do TCREATED=$(echo $LINE | jq -r .created) TTITLE=$(echo $LINE | jq -r .title) TTAGS=$(echo $LINE | jq -r .tags) + TOPIN=$(echo $LINE | jq -r .ipfs) + echo "$TTITLE" ## Count emails found @@ -216,7 +220,10 @@ while read LINE; do ~/.zen/Astroport.ONE/tools/timeout.sh -t 12 \ ${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey pay -a $nb -p ${ASTROG1} -c "${emails[@]} $TTITLE" -m > /dev/null 2>&1 ## PalPay $nb G1 ${MY_PATH}/../tools/mailjet.sh "${PLAYER}" "OK PalPay : $MSG" - echo "PAYMENT SENT" + echo "PAYMENT SENT --- PINNING $TOPIN" + + ## PINNING IPFS MEDIA - PROOF OF COPY SYSTEM - + ipfs pin add $TOPIN else diff --git a/tools/VISA.new.sh b/tools/VISA.new.sh index fca819d4..9acf0929 100755 --- a/tools/VISA.new.sh +++ b/tools/VISA.new.sh @@ -246,8 +246,9 @@ DISCO="/?salt=${USALT}&pepper=${UPEPPER}" sed -i "s~_CHAIN_~${TWMODEL}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html ## Fill PleaseDELETE - sed -i "s~_SALT_~${SALT}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html - sed -i "s~_PEPPER_~${PEPPER}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html + #~ sed -i "s~_SALT_~${SALT}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html + #~ sed -i "s~_PEPPER_~${PEPPER}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html + ## TODO : FOR STRONGER SECURITY REMOVE THIS LINE sed -i "s~_PASS_~${PASS}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html @@ -256,8 +257,8 @@ DISCO="/?salt=${USALT}&pepper=${UPEPPER}" [[ ${HPass} != "" ]] && SRCPASS=${HPass} || SRCPASS="_HPASS_" sed -i "s~${SRCPASS}~${HPASS}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html - ## RESET WISHES TO DEPLOY DERIVATED KEYS ON HOST AGAIN - sed -i "s~G1Voeu~voeu~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html + ## RESET WISHES TO DEPLOY DERIVATED KEYS ON HOST AGAIN ( DONE IN PLAYER_REFRESH ) + #~ sed -i "s~G1Voeu~voeu~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html ## Fill ♥BOX sed -i "s~_URL_~${URL}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html @@ -268,7 +269,7 @@ DISCO="/?salt=${USALT}&pepper=${UPEPPER}" sed -i "s~_WISHKEY_~${G1PUB}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html sed -i "s~_G1PUB_~${G1PUB}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html - sed -i "s~_QRSEC_~${PASsec}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html + #~ sed -i "s~_QRSEC_~${PASsec}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html ASTRONAUTENS=$(ipfs key list -l | grep -w "${PLAYER}" | cut -d ' ' -f 1) # La Clef IPNS porte comme nom G1PUB et ${PLAYER}