--progress="false"
This commit is contained in:
parent
e1069d26f1
commit
21f745c418
30
API/ZONE.sh
30
API/ZONE.sh
|
@ -73,11 +73,11 @@ echo "UMAPG1PUB=$UMAPG1PUB UMAPIPNS=$UMAPIPNS SECTORG1PUB=$SECTORG1PUB SECTORIPN
|
||||||
SECTOR="_${SLAT}_${SLON}"
|
SECTOR="_${SLAT}_${SLON}"
|
||||||
echo "SECTOR = ${SECTOR}"
|
echo "SECTOR = ${SECTOR}"
|
||||||
ZONEINDEX=$SECTORIPNS
|
ZONEINDEX=$SECTORIPNS
|
||||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${SLAT}*_${SLON}*/SECTORNS | tail -n 1)
|
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_${SLAT}_${SLON}/_*_*/SECTORNS | tail -n 1)
|
||||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${SLAT}*_${SLON}*/SECTORNS | tail -n 1)
|
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_${SLAT}_${SLON}/_*_*/SECTORNS | tail -n 1)
|
||||||
ZONEG1PUB=$SECTORG1PUB
|
ZONEG1PUB=$SECTORG1PUB
|
||||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${SLAT}*_${SLON}*/SECTORG1PUB | tail -n 1)
|
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_${SLAT}_${SLON}/_*_*/SECTORG1PUB | tail -n 1)
|
||||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${SLAT}*_${SLON}*/SECTORG1PUB | tail -n 1)
|
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_${SLAT}_${SLON}/_*_*/SECTORG1PUB | tail -n 1)
|
||||||
LAT=${SLAT}
|
LAT=${SLAT}
|
||||||
LON=${SLON}
|
LON=${SLON}
|
||||||
JSON="ZONE${SECTOR}_${DEG}.json"
|
JSON="ZONE${SECTOR}_${DEG}.json"
|
||||||
|
@ -92,11 +92,11 @@ echo "UMAPG1PUB=$UMAPG1PUB UMAPIPNS=$UMAPIPNS SECTORG1PUB=$SECTORG1PUB SECTORIPN
|
||||||
REGION="_${RLAT}_${RLON}"
|
REGION="_${RLAT}_${RLON}"
|
||||||
echo "REGION = ${REGION}"
|
echo "REGION = ${REGION}"
|
||||||
ZONEINDEX=$REGIONIPNS
|
ZONEINDEX=$REGIONIPNS
|
||||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${RLAT}*_${RLON}*/REGIONNS | tail -n 1)
|
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_*_*/_*_*/REGIONNS | tail -n 1)
|
||||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${RLAT}*_${RLON}*/REGIONNS | tail -n 1)
|
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_*_*/_*_*/REGIONNS | tail -n 1)
|
||||||
ZONEG1PUB=$REGIONG1PUB
|
ZONEG1PUB=$REGIONG1PUB
|
||||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${RLAT}*_${RLON}*/REGIONG1PUB | tail -n 1)
|
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_*_*/_*_*/REGIONG1PUB | tail -n 1)
|
||||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${RLAT}*_${RLON}*/REGIONG1PUB | tail -n 1)
|
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/_${RLAT}_${RLON}/_*_*/_*_*/REGIONG1PUB | tail -n 1)
|
||||||
LAT=${RLAT}
|
LAT=${RLAT}
|
||||||
LON=${RLON}
|
LON=${RLON}
|
||||||
JSON="ZONE${REGION}_${DEG}.json"
|
JSON="ZONE${REGION}_${DEG}.json"
|
||||||
|
@ -110,15 +110,15 @@ if [[ ! -s ~/.zen/tmp/${JSON} ]]; then
|
||||||
## UMAP LEVEL
|
## UMAP LEVEL
|
||||||
if [[ ${DEG} == "0.001" ]]; then
|
if [[ ${DEG} == "0.001" ]]; then
|
||||||
|
|
||||||
swarmnum=$(ls -d ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/TW/* 2>/dev/null | wc -l )
|
swarmnum=$(ls -d ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}_${LON}/TW/* 2>/dev/null | wc -l )
|
||||||
nodenum=$(ls -d ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/TW/* 2>/dev/null | wc -l )
|
nodenum=$(ls -d ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}_${LON}/TW/* 2>/dev/null | wc -l )
|
||||||
totnum=$(( swarmnum + nodenum ))
|
totnum=$(( swarmnum + nodenum ))
|
||||||
echo " ## UMAP _${LAT}*_${LON}* = ${totnum} PLAYERs"
|
echo " ## UMAP _${LAT}_${LON} = ${totnum} PLAYERs"
|
||||||
|
|
||||||
UMAPNS=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/TODATENS)
|
UMAPNS=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}_${LON}/TODATENS | tail -n 1)
|
||||||
[[ ! $UMAPNS ]] && UMAPNS=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/TODATENS)
|
[[ ! $UMAPNS ]] && UMAPNS=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}_${LON}/TODATENS | tail -n 1))
|
||||||
G1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/G1PUB)
|
G1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}_${LON}/G1PUB | tail -n 1))
|
||||||
[[ ! $G1PUB ]] && G1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/G1PUB)
|
[[ ! $G1PUB ]] && G1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}_${LON}/G1PUB | tail -n 1))
|
||||||
|
|
||||||
echo '{ "gridNumbers": [ {"lat": '${LAT}', "lon": '${LON}', "number": "(_'${LAT}'_'${LON}') = '${totnum}'", "ipns": "'${myIPFS}/ipns/${UMAPNS}/_index.html'" } ] }' \
|
echo '{ "gridNumbers": [ {"lat": '${LAT}', "lon": '${LON}', "number": "(_'${LAT}'_'${LON}') = '${totnum}'", "ipns": "'${myIPFS}/ipns/${UMAPNS}/_index.html'" } ] }' \
|
||||||
> ~/.zen/tmp/${MOATS}/http.grid
|
> ~/.zen/tmp/${MOATS}/http.grid
|
||||||
|
|
|
@ -151,7 +151,7 @@ while true; do
|
||||||
|
|
||||||
## IPFS GET TO /swarm/${ipfsnodeid}
|
## IPFS GET TO /swarm/${ipfsnodeid}
|
||||||
echo "GETTING ${nodeip} : /ipns/${ipfsnodeid}"
|
echo "GETTING ${nodeip} : /ipns/${ipfsnodeid}"
|
||||||
ipfs --timeout 720s get -o ~/.zen/tmp/-${ipfsnodeid}/ /ipns/${ipfsnodeid}/
|
ipfs --timeout 720s get --progress="false" -o ~/.zen/tmp/-${ipfsnodeid}/ /ipns/${ipfsnodeid}/
|
||||||
|
|
||||||
## SHOW WHAT WE GET
|
## SHOW WHAT WE GET
|
||||||
echo "__________________________________________________"
|
echo "__________________________________________________"
|
||||||
|
@ -198,7 +198,7 @@ while true; do
|
||||||
if [[ ! -d ~/.zen/tmp/swarm/${znod} ]]; then
|
if [[ ! -d ~/.zen/tmp/swarm/${znod} ]]; then
|
||||||
echo "COMPLETING MY SWARM DATA WITH ZNOD=${znod}"
|
echo "COMPLETING MY SWARM DATA WITH ZNOD=${znod}"
|
||||||
mkdir -p ~/.zen/tmp/swarm/${znod}
|
mkdir -p ~/.zen/tmp/swarm/${znod}
|
||||||
ipfs --timeout 180s get -o ~/.zen/tmp/swarm/${znod} /ipns/${znod}
|
ipfs --timeout 180s get --progress="false" -o ~/.zen/tmp/swarm/${znod} /ipns/${znod}
|
||||||
else
|
else
|
||||||
echo "____________ KNOW ${znod}"
|
echo "____________ KNOW ${znod}"
|
||||||
# TODO : SPEEDUP REFRESH COMPARE _MySwarm.moats AND KEEP LATEST
|
# TODO : SPEEDUP REFRESH COMPARE _MySwarm.moats AND KEEP LATEST
|
||||||
|
@ -252,7 +252,7 @@ while true; do
|
||||||
## IPFS GET LAST ONLINE IPFSNODEID MAP
|
## IPFS GET LAST ONLINE IPFSNODEID MAP
|
||||||
rm -Rf ~/.zen/tmp/_${IPFSNODEID} 2>/dev/null
|
rm -Rf ~/.zen/tmp/_${IPFSNODEID} 2>/dev/null
|
||||||
mkdir -p ~/.zen/tmp/_${IPFSNODEID}
|
mkdir -p ~/.zen/tmp/_${IPFSNODEID}
|
||||||
ipfs get -o ~/.zen/tmp/_${IPFSNODEID}/ /ipns/${IPFSNODEID}/
|
ipfs get --progress="false" -o ~/.zen/tmp/_${IPFSNODEID}/ /ipns/${IPFSNODEID}/
|
||||||
NSIZE=$(du -b ~/.zen/tmp/_${IPFSNODEID} | tail -n 1 | cut -f 1)
|
NSIZE=$(du -b ~/.zen/tmp/_${IPFSNODEID} | tail -n 1 | cut -f 1)
|
||||||
|
|
||||||
### CHECK IF SIZE DIFFERENCE ?
|
### CHECK IF SIZE DIFFERENCE ?
|
||||||
|
|
Loading…
Reference in New Issue