From 2a61784d3c38f05569a33dd050ef6c7c57dfb6a9 Mon Sep 17 00:00:00 2001 From: fred Date: Mon, 11 Mar 2024 17:59:36 +0100 Subject: [PATCH] SECTOR better 32.34 just remove last char => 32.1 1st decimal only --- API/ZONE.sh | 4 ++-- RUNTIME/PLAYER.refresh.sh | 6 +++--- RUNTIME/PLAYER.unplug.sh | 6 ++++-- RUNTIME/SECTOR.refresh.sh | 4 ++-- RUNTIME/UPLANET.refresh.sh | 12 ++++++------ RUNTIME/VISA.new.sh | 8 ++++---- RUNTIME/VOEUX.refresh.sh | 4 ++-- RUNTIME/ZEN.UMAP.memory.sh | 4 ++-- adventure/infra/Readme.md | 1 - adventure/infra/octoken | 1 - adventure/infra/readme | 0 11 files changed, 25 insertions(+), 25 deletions(-) delete mode 100644 adventure/infra/Readme.md delete mode 100644 adventure/infra/octoken delete mode 100644 adventure/infra/readme diff --git a/API/ZONE.sh b/API/ZONE.sh index a647ccbf..d6ec206c 100755 --- a/API/ZONE.sh +++ b/API/ZONE.sh @@ -71,8 +71,8 @@ echo "${THEDATE}" ## SECTOR LEVEL if [[ ${DEG} == "0.01" ]]; then - SECLAT="${LAT::-1}" - SECLON="${LON::-1}" + SECLAT="${LAT%.*}.1" + SECLON="${LON%.*}.1" SECTOR="_${SECLAT}_${SECLON}" echo "SECTOR = ${SECTOR}" ZONEG1PUB=$(${MY_PATH}/../tools/keygen -t duniter "${UPLANETNAME}${SECTOR}" "${UPLANETNAME}${SECTOR}") diff --git a/RUNTIME/PLAYER.refresh.sh b/RUNTIME/PLAYER.refresh.sh index c2f150c2..26bc4faa 100755 --- a/RUNTIME/PLAYER.refresh.sh +++ b/RUNTIME/PLAYER.refresh.sh @@ -201,7 +201,7 @@ for PLAYER in ${PLAYERONE[@]}; do LON=$(cat ~/.zen/tmp/${MOATS}/GPS.json | jq -r .[].lon) [[ $LON == "null" || $LON == "" ]] && LON="0.00" - SECTOR="_${LAT::-1}_${LON::-1}" + SECTOR="_${LAT%.*}.1_${LON%.*}.1" ## UMAP TODATENS ################ ipfs key rm "temp" >/dev/null 2>&1 @@ -522,8 +522,8 @@ for PLAYER in ${PLAYERONE[@]}; do ################################################# if [[ ${LAT} && ${LON} ]]; then ## SECTOR BANK COORD - SECLAT="${LAT::-1}" - SECLON="${LON::-1}" + SECLAT="${LAT%.*}.1" + SECLON="${LON%.*}.1" ## REGION REGLAT=$(echo ${LAT} | cut -d '.' -f 1) REGLON=$(echo ${LON} | cut -d '.' -f 1) diff --git a/RUNTIME/PLAYER.unplug.sh b/RUNTIME/PLAYER.unplug.sh index d75fe782..fb88ffa6 100755 --- a/RUNTIME/PLAYER.unplug.sh +++ b/RUNTIME/PLAYER.unplug.sh @@ -30,7 +30,9 @@ mkdir -p ~/.zen/tmp/${MOATS} --render '.' 'GPS.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'GPS' ## GPS Tiddler TWMAPNS=$(cat ~/.zen/tmp/${MOATS}/GPS.json | jq -r .[].umap) LAT=$(cat ~/.zen/tmp/${MOATS}/GPS.json | jq -r .[].lat) + [[ $LAT == "null" || $LAT == "" ]] && LAT="0.00" LON=$(cat ~/.zen/tmp/${MOATS}/GPS.json | jq -r .[].lon) + [[ $LON == "null" || $LON == "" ]] && LON="0.00" echo "LAT=${LAT}; LON=${LON}; UMAPNS=${TWMAPNS}" rm ~/.zen/tmp/${MOATS}/GPS.json @@ -42,8 +44,8 @@ mkdir -p ~/.zen/tmp/${MOATS} ############################################################## # UMAPG1PUB=$(${MY_PATH}/keygen -t duniter "${UPLANETNAME}${LAT}" "${UPLANETNAME}${LON}") ############################################################## - SECLAT="${LAT::-1}" - SECLON="${LON::-1}" + SECLAT="${LAT%.*}.1" + SECLON="${LON%.*}.1" SECTOR="_${SECLAT}_${SECLON}" ############################################################## SECTORG1PUB=$(${MY_PATH}/../tools/keygen -t duniter "${UPLANETNAME}${SECTOR}" "${UPLANETNAME}${SECTOR}") diff --git a/RUNTIME/SECTOR.refresh.sh b/RUNTIME/SECTOR.refresh.sh index 8105867f..b8cd17ac 100755 --- a/RUNTIME/SECTOR.refresh.sh +++ b/RUNTIME/SECTOR.refresh.sh @@ -45,8 +45,8 @@ for UMAP in ${UMAPS[@]}; do [[ ${LAT} == "" || ${LON} == "" ]] && echo ">> ERROR BAD ${LAT} ${LON}" && continue [[ ${LAT} == "null" || ${LON} == "null" ]] && echo ">> ERROR BAD ${LAT} ${LON}" && continue - SECLAT="${LAT::-1}" - SECLON="${LON::-1}" + SECLAT="${LAT%.*}.1" + SECLON="${LON%.*}.1" MYSECTORS=("_${SECLAT}_${SECLON}" ${MYSECTORS[@]}) diff --git a/RUNTIME/UPLANET.refresh.sh b/RUNTIME/UPLANET.refresh.sh index 49036653..e59bffdb 100755 --- a/RUNTIME/UPLANET.refresh.sh +++ b/RUNTIME/UPLANET.refresh.sh @@ -57,8 +57,8 @@ for UMAP in ${unique_combined[@]}; do [[ ${LAT} == "null" || ${LON} == "null" ]] && echo ">> ERROR BAD ${LAT} ${LON}" && continue ## SECTOR BANK COORD - SECLAT="${LAT::-1}" - SECLON="${LON::-1}" + SECLAT="${LAT%.*}.1" + SECLON="${LON%.*}.1" ## REGION REGLAT=$(echo ${LAT} | cut -d '.' -f 1) REGLON=$(echo ${LON} | cut -d '.' -f 1) @@ -193,8 +193,8 @@ for UMAP in ${unique_combined[@]}; do # %%%%%%%%%% ################################################## ## SECTOR LINKING >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>${SLAT}_${SLON} # %%%%%%%%%% ################################################## - SLAT="${LAT::-1}" - SLON="${LON::-1}" + SLAT="${LAT%.*}.1" + SLON="${LON%.*}.1" SECTOR="_${SLAT}_${SLON}" echo "SECTOR ${SECTOR}" ############################################################## "${UPLANETNAME}${LAT}" "${UPLANETNAME}${LON}" @@ -386,8 +386,8 @@ for UMAP in ${unique_combined[@]}; do echo "JSON UMAP WORLD READY /ipfs/${IAMAP}/world.js" ########################################################################################### ### APPLY ON APP MODEL - SECLAT="${LAT::-1}" - SECLON="${LON::-1}" + SECLAT="${LAT%.*}.1" + SECLON="${LON%.*}.1" SECTOR="_${SECLAT}_${SECLON}" TODATESECTORNS=$(${MY_PATH}/../tools/keygen -t ipfs "${TODATE}${UPLANETNAME}${SECTOR}" "${TODATE}${UPLANETNAME}${SECTOR}") diff --git a/RUNTIME/VISA.new.sh b/RUNTIME/VISA.new.sh index 81793e14..72ea176f 100755 --- a/RUNTIME/VISA.new.sh +++ b/RUNTIME/VISA.new.sh @@ -294,7 +294,7 @@ sed -i "s~ipfs.copylaradio.com~$myTUBE~g" ~/.zen/game/players/${PLAYER}/ipfs/moa [[ ! ${LAT} ]] && LAT="0.00" [[ ! ${LON} ]] && LON="0.00" -SECTOR="_${LAT::-1}_${LON::-1}" ### SECTOR = 0.1° Planet Slice in MadeInZion Tiddler +SECTOR="_${LAT%.*}.1_${LON%.*}.1" ### SECTOR = 0.1° Planet Slice in MadeInZion Tiddler echo "UPlanet 0.1° SECTOR : ${SECTOR}" sed -i "s~_SECTOR_~${SECTOR}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html @@ -340,8 +340,8 @@ if [[ "${MACHINEPUB}" != "" ]]; then ${MY_PATH}/../tools/natools.py encrypt \ -p ${MACHINEPUB} \ -i $HOME/.zen/game/players/${PLAYER}/secret.june \ - -o $HOME/.zen/tmp/${MOATS}/secret.dunikey.${G1PUB}.enc - ENCODING=$(cat ~/.zen/tmp/${MOATS}/bafybeiewwxkmiojbskcqhbj2gbkde3czkeqftn6fgvwoa7ez5n5whido3qsecret.dunikey.$G1PUB.enc | base16) + -o $HOME/.zen/tmp/${MOATS}/secret.june.${G1PUB}.enc + ENCODING=$(cat ~/.zen/tmp/${MOATS}/secret.june.$G1PUB.enc | base16) sed -i "s~${OLD16}~${ENCODING}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html echo "ENCODING: ${ENCODING}" @@ -603,7 +603,7 @@ do done <"$asciiart" echo " -

<--> 0.1 SECTOR : ${SECTOR} <-->

+

<--> 0.1 SECTOR : ${SECTOR} <-->


PRINT & KEEP SAFE AstroID

SECRET1=$SALT
SECRET2=$PEPPER
($PASS)

ASTROPORT : /ipns/${IPFSNODEID}

diff --git a/RUNTIME/VOEUX.refresh.sh b/RUNTIME/VOEUX.refresh.sh index 82c9ccc2..ea77a8b5 100755 --- a/RUNTIME/VOEUX.refresh.sh +++ b/RUNTIME/VOEUX.refresh.sh @@ -304,8 +304,8 @@ if [[ ${wishnumbers} -gt 0 ]]; then LON=$(makecoord $LON) echo "LAT=${LAT}; LON=${LON}; UMAPNS=${TWMAPNS}" rm ~/.zen/tmp/${MOATS}/GPS.json - SECLAT="${LAT::-1}" - SECLON="${LON::-1}" + SECLAT="${LAT%.*}.1" + SECLON="${LON%.*}.1" SECTOR="_${SECLAT}_${SECLON}" ############################################################## UMAPG1PUB=$(${MY_PATH}/../tools/keygen -t duniter "${UPLANETNAME}${LAT}" "${UPLANETNAME}${LON}") diff --git a/RUNTIME/ZEN.UMAP.memory.sh b/RUNTIME/ZEN.UMAP.memory.sh index 64efed99..7899533d 100755 --- a/RUNTIME/ZEN.UMAP.memory.sh +++ b/RUNTIME/ZEN.UMAP.memory.sh @@ -32,8 +32,8 @@ LAT=$(echo ${UMAP} | cut -d '_' -f 2) LON=$(echo ${UMAP} | cut -d '_' -f 3) ## SECTOR COORD -SECLAT="${LAT::-1}" -SECLON="${LON::-1}" +SECLAT="${LAT%.*}.1" +SECLON="${LON%.*}.1" SECTOR="_${SECLAT}_${SECLON}" diff --git a/adventure/infra/Readme.md b/adventure/infra/Readme.md deleted file mode 100644 index 6eef328b..00000000 --- a/adventure/infra/Readme.md +++ /dev/null @@ -1 +0,0 @@ -ici diff --git a/adventure/infra/octoken b/adventure/infra/octoken deleted file mode 100644 index f05f3eef..00000000 --- a/adventure/infra/octoken +++ /dev/null @@ -1 +0,0 @@ -dedab23fbf01dc62a9b5d894aa696486dc0fe362 diff --git a/adventure/infra/readme b/adventure/infra/readme deleted file mode 100644 index e69de29b..00000000