From 38659ad19ae8a089a037b19d944f37862c9d5d96 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 12 Sep 2023 17:19:36 +0200 Subject: [PATCH] UPLANET : UMAPNS now have a navigator App (umap.html is the template) --- API/UPLANET.sh | 2 +- RUNTIME/UPLANET.refresh.sh | 19 +++++++++++++++++++ templates/umap.html | 36 +++++++++++++++++++++++++++--------- 3 files changed, 47 insertions(+), 10 deletions(-) diff --git a/API/UPLANET.sh b/API/UPLANET.sh index 046c3862..61345b3b 100755 --- a/API/UPLANET.sh +++ b/API/UPLANET.sh @@ -145,7 +145,7 @@ if [[ "${EMAIL}" =~ ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$ ]]; then else - echo "BAD EMAIL $LAT $LON - DEFAULT OPEN UMAP IPNS LINK -" + echo "BAD EMAIL $LAT $LON - OPEN UMAP IPNS LINK -" (echo "$HTTPCORS '" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && exit 0 fi diff --git a/RUNTIME/UPLANET.refresh.sh b/RUNTIME/UPLANET.refresh.sh index 5f67907a..482a76f2 100755 --- a/RUNTIME/UPLANET.refresh.sh +++ b/RUNTIME/UPLANET.refresh.sh @@ -89,6 +89,7 @@ mkdir ~/.zen/tmp/${MOATS} ############################################################## ############################################################## + if [[ ! -s ~/.zen/tmp/${MOATS}/${UMAP}/geolinks.json ]]; then ############################################################## ## CALCULATE SURROUNDING UMAPS ############################################################## @@ -187,6 +188,24 @@ mkdir ~/.zen/tmp/${MOATS} SWUMAPNS=$(ipfs key import ${SEWALLET} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/SEWALLET.priv) ipfs key rm ${SEWALLET} + jq -n \ + --arg north "${myIPFS}/ipns/${NUMAPNS}" \ + --arg south "${myIPFS}/ipns/${SUMAPNS}" \ + --arg east "${myIPFS}/ipns/${EUMAPNS}" \ + --arg west "${myIPFS}/ipns/${WUMAPNS}" \ + --arg northeast "${myIPFS}/ipns/${NEUMAPNS}" \ + --arg northwest "${myIPFS}/ipns/${NWUMAPNS}" \ + --arg southeast "${myIPFS}/ipns/${SEMAPNS}" \ + --arg southwest "${myIPFS}/ipns/${SWMAPNS}" \ + '{north: $north, south: $south, east: $east, west: $west, northeast: $northeast, northwest: $northwest, southeast: $southeast, southwest: $southwest}' \ + > ~/.zen/tmp/${MOATS}/${UMAP}/geolinks.json + + fi + + ### SET navigator.html ## MAKE EVOLVE template/umap.html + cp ${MY_PATH}/../templates/umap.html ~/.zen/tmp/${MOATS}/${UMAP}/navigator_Umap.html + cat ~/.zen/tmp/${MOATS}/${UMAP}/navigator_map.html | sed "s~Umap~Usat~g" > ~/.zen/tmp/${MOATS}/${UMAP}/navigator_Usat.html + ############################################################## ############################ PUBLISHING UMAP ############################################################## diff --git a/templates/umap.html b/templates/umap.html index 51987465..c8a2abea 100644 --- a/templates/umap.html +++ b/templates/umap.html @@ -8,7 +8,7 @@ body { margin: 0; padding: 0; - background-image: url('image.png'); + background-image: url('Umap.jpg'); background-size: contain; background-repeat: no-repeat; background-position: center; @@ -47,15 +47,33 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+