Prepare Dessin de Moa as Astronaut ID NFT sharing for friendship declaration.
This commit is contained in:
parent
9ea28792a1
commit
bba864f7a0
|
@ -15,7 +15,8 @@ MY_PATH="`dirname \"$0\"`" # relative
|
|||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
|
||||
# Get Player Name
|
||||
PLAYER="$1"
|
||||
PLAYER=$(cat ~/.zen/game/players/.current/.player 2>/dev/null)
|
||||
[[ $PLAYER == "" ]] && echo "NO PLAYER - EXIT" && exit 1
|
||||
|
||||
mkdir -p ~/.zen/tmp/gchange
|
||||
|
||||
|
@ -25,15 +26,21 @@ g1pub=$(cat ~/.zen/game/players/$PLAYER/secret.dunikey | grep 'pub:' | cut -d '
|
|||
CESIUM="https://g1.data.presles.fr"
|
||||
GCHANGE="https://data.gchange.fr" # /user/profile/2L8vaYixCf97DMT8SistvQFeBj7vb6RQL7tvwyiv1XVH?&_source_exclude=avatar._content
|
||||
|
||||
#curl -sk ${CESIUM}/user/profile/${g1pub} -o ~/.zen/cache/cesium_profile.json
|
||||
LON=$(cat ~/.zen/cache/cesium_profile.json | jq '._source.geoPoint.lon')
|
||||
LAT=$(cat ~/.zen/cache/cesium_profile.json | jq '._source.geoPoint.lat')
|
||||
|
||||
curl -sk ${GCHANGE}/user/profile/${g1pub} -o ~/.zen/cache/GCHANGE_profile.json
|
||||
LON=$(cat ~/.zen/cache/GCHANGE_profile.json | jq '._source.geoPoint.lon')
|
||||
LAT=$(cat ~/.zen/cache/GCHANGE_profile.json | jq '._source.geoPoint.lat')
|
||||
tiddlywiki --verbose --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html --output ~/.zen/tmp/gchange --render '.' 'carte.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'Carte'
|
||||
tiddlywiki --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html --output ~/.zen/tmp/gchange --render '.' 'gchange.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'Gchange'
|
||||
tiddlywiki --verbose --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html --output ~/.zen/tmp/gchange --render '.' 'g1visa.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'G1Visa'
|
||||
tiddlywiki --verbose --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html --output ~/.zen/tmp/gchange --render '.' 'MOA.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '"Dessin de Moa"'
|
||||
|
||||
RAD="$1"
|
||||
GPS=$(cat ~/.zen/tmp/gchange/carte.json | jq -r .[].gps)
|
||||
DIST=$(cat ~/.zen/tmp/gchange/gchange.json | jq -r .[].distance)
|
||||
RECH=($(cat ~/.zen/tmp/gchange/gchange.json | jq -r .[].recherche))
|
||||
MOANFT=$(cat /home/fred/.zen/tmp/gchange/MOA.json | jq .[].text)
|
||||
|
||||
# AJOUTER CHAMPS à "Dessin de Moa"
|
||||
# IPFSNODEADDRESS
|
||||
|
||||
RAD="$DIST"
|
||||
[[ ! $RAD ]] && RAD="50km"
|
||||
|
||||
if [[ "$LON" != "null" ]]; then
|
||||
|
@ -56,7 +63,7 @@ curl -sk -XPOST 'https://data.gchange.fr/market/record/_search?pretty&_source=ti
|
|||
}' > /tmp/gchange.json || exit 1
|
||||
else
|
||||
echo "Aucune coordonnées geoPoint pour $g1pub"
|
||||
sbotc publish '{"type":"post","text":"Ajouter sa géolocalisation dans Cesium+ permet de publier les annonces autour de chez soi..."}'
|
||||
# Message tiddlywiki TODO
|
||||
exit 1
|
||||
fi
|
||||
TIMEBEFORE=$(date -u --date="-$DELAY" +"%s")
|
||||
|
|
|
@ -33,7 +33,7 @@ for PLAYER in $(ls ~/.zen/game/players/); do
|
|||
continue
|
||||
else
|
||||
## Replace tube links with downloaded video ## TODO create LOG tiddler
|
||||
$MY_PATH/../tools/TUBE.copy.sh ~/.zen/tmp/astro/index.html $PLAYER
|
||||
# $MY_PATH/../tools/TUBE.copy.sh ~/.zen/tmp/astro/index.html $PLAYER (TODO Reactivate after Dessin de Moa cleaning from Voeu template)
|
||||
echo "DIFFERENCE ?"
|
||||
DIFF=$(diff ~/.zen/tmp/astro/index.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html)
|
||||
if [[ $DIFF ]]; then
|
||||
|
|
|
@ -71,6 +71,7 @@ for yurl in $(cat ~/.zen/tmp/tiddlers.json | jq -r '.[].text' | grep 'http'); do
|
|||
tiddlywiki --verbose --load $INDEX \
|
||||
--import ~/.zen/tmp/tube.json "application/json" \
|
||||
--deletetiddlers '[tag[tube]]' \
|
||||
--deletetiddlers '"Dessin de Moa"' \
|
||||
--output ~/.zen/tmp --render "$:/core/save/all" "newindex.html" "text/plain"
|
||||
|
||||
if [[ -s ~/.zen/tmp/newindex.html ]]; then
|
||||
|
|
Loading…
Reference in New Issue