From b5d6003379658346023482e8e78e0f634f9bf358 Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 16 Mar 2023 18:07:52 +0100 Subject: [PATCH] show player wishes buttons --- tools/make_image_ipfs_index_carousel.sh | 17 +++++++++++++++-- www/G1PalPay/index.html | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/tools/make_image_ipfs_index_carousel.sh b/tools/make_image_ipfs_index_carousel.sh index 979c8e89..679b6799 100755 --- a/tools/make_image_ipfs_index_carousel.sh +++ b/tools/make_image_ipfs_index_carousel.sh @@ -53,8 +53,21 @@ if [[ ! -d $img_dir ]]; then && echo "_REPLACE_" > ~/.zen/tmp/carousel/${pub}.insert \ || echo "_REPLACE_" > ~/.zen/tmp/carousel/${pub}.insert - ## Add Button for every wish : TODO - echo "Ŋ1Flux " > ~/.zen/tmp/carousel/${pub}.button + ## EXTRACT G1Voeu FROM PLAYER TW + echo "Ŋ1Flux " > ~/.zen/tmp/carousel/${pub}.button + INDEX=~/.zen/game/players/${PLAYER}/ipfs/moa/index.html + if [[ -s ${INDEX} ]]; then + tiddlywiki --load ${INDEX} --output ~/.zen/tmp --render '.' "${PLAYER}.g1voeu.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[G1Voeu]]' + cat ~/.zen/tmp/${PLAYER}.g1voeu.json | jq -r '.[].wish' > ~/.zen/tmp/${PLAYER}.g1wishes.txt + while read WISH + do + [[ ${WISH} == "" || ${WISH} == "null" ]] && echo "BLURP. EMPTY WISH" && continue + WISHNAME=$(cat ~/.zen/tmp/${PLAYER}.g1voeu.json | jq .[] | jq -r 'select(.wish=="'${WISH}'") | .title') + [[ ! ${WISHNAME} ]] && echo "WISH sans NOM - CONTINUE -" && continue + echo "" >> ~/.zen/tmp/carousel/${pub}.button + done < ~/.zen/tmp/${PLAYER}.g1wishes.txt + fi + ################## done diff --git a/www/G1PalPay/index.html b/www/G1PalPay/index.html index 5cb29db8..5b9f67d3 100644 --- a/www/G1PalPay/index.html +++ b/www/G1PalPay/index.html @@ -102,7 +102,7 @@ a {
-

(Ğ1) ♥Box Station


+

(Ğ1) ♥Box Station


Oubliez la crise... N'attendez pas la Retraite !

Essayez la Monnaie Libre. Découvrez le monde d'égale à égal.