forked from STI/Astroport.ONE
SECLAT SLAT REGLAT RLAT
This commit is contained in:
parent
0bb1684190
commit
fe206e1565
32
API/ZONE.sh
32
API/ZONE.sh
@ -65,29 +65,29 @@ JSON="ZONE_${LAT}_${LON}_${DEG}.json"
|
||||
|
||||
## SECTOR LEVEL
|
||||
if [[ ${DEG} == "0.01" ]]; then
|
||||
SECLAT="${LAT::-1}"
|
||||
SECLON="${LON::-1}"
|
||||
SECTOR="_${SECLAT}_${SECLON}"
|
||||
SLAT="${LAT::-1}"
|
||||
SLON="${LON::-1}"
|
||||
SECTOR="_${SLAT}_${SLON}"
|
||||
echo "SECTOR = ${SECTOR}"
|
||||
ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${SECLAT}*_${SECLON}*/SECTORNS | tail -n 1)
|
||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${SECLAT}*_${SECLON}*/SECTORNS | tail -n 1)
|
||||
ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${SECLAT}*_${SECLON}*/SECTORG1PUB | tail -n 1)
|
||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${SECLAT}*_${SECLON}*/SECTORG1PUB | tail -n 1)
|
||||
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)
|
||||
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)
|
||||
JSON="ZONE${SECTOR}_${DEG}.json"
|
||||
|
||||
fi
|
||||
|
||||
## REGION & ABOVE LEVEL
|
||||
if [[ ${DEG} == "0.1" || ${DEG} == "1" ]]; then
|
||||
LAT=$(echo ${LAT} | cut -d '.' -f 1)
|
||||
LON=$(echo ${LON} | cut -d '.' -f 1)
|
||||
ZONE="_${LAT}_${LON}"
|
||||
echo "ZONE = ${ZONE}"
|
||||
ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONNS | tail -n 1)
|
||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONNS | tail -n 1)
|
||||
ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONG1PUB | tail -n 1)
|
||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}*_${LON}*/REGIONG1PUB | tail -n 1)
|
||||
JSON="ZONE${ZONE}_${DEG}.json"
|
||||
RLAT="$(echo ${LAT} | cut -d '.' -f 1)"
|
||||
RLON="$(echo ${LON} | cut -d '.' -f 1)"
|
||||
REGION="_${RLAT}_${RLON}"
|
||||
echo "REGION = ${REGION}"
|
||||
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)
|
||||
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)
|
||||
JSON="ZONE${REGION}_${DEG}.json"
|
||||
|
||||
fi
|
||||
|
||||
|
@ -586,35 +586,35 @@ for PLAYER in ${PLAYERONE[@]}; do
|
||||
################### COPY DATA TO UP LEVEL GRIDS
|
||||
#################################################
|
||||
## SECTOR BANK COORD
|
||||
SECLAT="${LAT::-1}"
|
||||
SECLON="${LON::-1}"
|
||||
SLAT="${LAT::-1}"
|
||||
SLON="${LON::-1}"
|
||||
## REGION
|
||||
REGLAT=$(echo ${LAT} | cut -d '.' -f 1)
|
||||
REGLON=$(echo ${LON} | cut -d '.' -f 1)
|
||||
RLAT=$(echo ${LAT} | cut -d '.' -f 1)
|
||||
RLON=$(echo ${LON} | cut -d '.' -f 1)
|
||||
|
||||
echo "/UPLANET/__/_${REGLAT}_${REGLON}/_${SECLAT}_${SECLON}/_${LAT}_${LON}"
|
||||
echo "/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}"
|
||||
## IPFSNODEID 12345 CACHE UPLANET/__/_*_*/_*.?_*.?/_*.??_*.??
|
||||
mkdir -p ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${REGLAT}_${REGLON}/_${SECLAT}_${SECLON}/_${LAT}_${LON}/RSS/
|
||||
mkdir -p ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/RSS/
|
||||
|
||||
cp ~/.zen/game/players/${PLAYER}/ipfs/${PLAYER}.rss.json \
|
||||
~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${REGLAT}_${REGLON}/_${SECLAT}_${SECLON}/_${LAT}_${LON}/RSS/
|
||||
~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/RSS/
|
||||
#### CREATE ALL JSON COMPILATION
|
||||
${MY_PATH}/../tools/json_dir.all.sh \
|
||||
~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${REGLAT}_${REGLON}/_${SECLAT}_${SECLON}/_${LAT}_${LON}/RSS/
|
||||
~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/RSS/
|
||||
|
||||
## IPFS PLAYER TW #
|
||||
mkdir -p ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${REGLAT}_${REGLON}/_${SECLAT}_${SECLON}/_${LAT}_${LON}/TW/${PLAYER}
|
||||
mkdir -p ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/TW/${PLAYER}
|
||||
# /ipfs/${TW} = /TW/${PLAYER}/index.html
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; url='/ipfs/${TW}'\" />${TODATE}:${PLAYER}" \
|
||||
> ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${REGLAT}_${REGLON}/_${SECLAT}_${SECLON}/_${LAT}_${LON}/TW/${PLAYER}/index.html
|
||||
> ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/TW/${PLAYER}/index.html
|
||||
# /ipns/${ASTRONAUTENS} = /TW/${PLAYER}/_index.html
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; url='/ipns/${ASTRONAUTENS}'\" />${PLAYER}" \
|
||||
> ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${REGLAT}_${REGLON}/_${SECLAT}_${SECLON}/_${LAT}_${LON}/TW/${PLAYER}/_index.html
|
||||
> ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/TW/${PLAYER}/_index.html
|
||||
## IPNS UMAP _index.html ##
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; url='/ipns/${UMAPNS}'\" />${TODATE}:_${LAT}_${LON}" \
|
||||
> ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${REGLAT}_${REGLON}/_${SECLAT}_${SECLON}/_${LAT}_${LON}/_index.html
|
||||
> ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/_index.html
|
||||
|
||||
ls -al ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${REGLAT}_${REGLON}/_${SECLAT}_${SECLON}/_${LAT}_${LON} 2>/dev/null
|
||||
ls -al ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON} 2>/dev/null
|
||||
echo "(☉_☉ ) (☉_☉ ) (☉_☉ )"
|
||||
|
||||
#####################################################################
|
||||
|
@ -44,9 +44,9 @@ mkdir -p ~/.zen/tmp/${MOATS}
|
||||
##############################################################
|
||||
# UMAPG1PUB=$(${MY_PATH}/keygen -t duniter "${UPLANETNAME}${LAT}" "${UPLANETNAME}${LON}")
|
||||
##############################################################
|
||||
SECLAT="${LAT::-1}"
|
||||
SECLON="${LON::-1}"
|
||||
SECTOR="_${SECLAT}_${SECLON}"
|
||||
SLAT="${LAT::-1}"
|
||||
SLON="${LON::-1}"
|
||||
SECTOR="_${SLAT}_${SLON}"
|
||||
##############################################################
|
||||
SECTORG1PUB=$(${MY_PATH}/../tools/keygen -t duniter "${UPLANETNAME}${SECTOR}" "${UPLANETNAME}${SECTOR}")
|
||||
##############################################################
|
||||
|
@ -48,10 +48,10 @@ for UMAP in ${UMAPS[@]}; do
|
||||
[[ ${LAT} == "" || ${LON} == "" ]] && echo ">> ERROR BAD ${LAT} ${LON}" && continue
|
||||
[[ ${LAT} == "null" || ${LON} == "null" ]] && echo ">> ERROR BAD ${LAT} ${LON}" && continue
|
||||
|
||||
REGLAT=$(echo ${LAT} | cut -d '.' -f 1)
|
||||
REGLON=$(echo ${LON} | cut -d '.' -f 1)
|
||||
RLAT=$(echo ${LAT} | cut -d '.' -f 1)
|
||||
RLON=$(echo ${LON} | cut -d '.' -f 1)
|
||||
|
||||
MYREGIONS=("_${REGLAT}_${REGLON}" ${MYREGIONS[@]})
|
||||
MYREGIONS=("_${RLAT}_${RLON}" ${MYREGIONS[@]})
|
||||
|
||||
done
|
||||
|
||||
@ -66,8 +66,8 @@ for REGION in ${REGIONS[@]}; do
|
||||
echo "-------------------------------------------------------------------"
|
||||
echo "_____REGION ${REGION} $(date)"
|
||||
mkdir -p ~/.zen/tmp/${MOATS}/${REGION}
|
||||
REGLAT=$(echo ${REGION} | cut -d '_' -f 2)
|
||||
REGLON=$(echo ${REGION} | cut -d '_' -f 3)
|
||||
RLAT=$(echo ${REGION} | cut -d '_' -f 2)
|
||||
RLON=$(echo ${REGION} | cut -d '_' -f 3)
|
||||
|
||||
################################## TODO : make sharing key protocol evolve
|
||||
## FOR NOW ONLY 1ST BOOSTRAP PUBLISH REGION KEYS
|
||||
@ -104,11 +104,11 @@ for REGION in ${REGIONS[@]}; do
|
||||
## FULL REFRESH DEMO... ZEN CHAINING COMING LATER
|
||||
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
mkdir -p ~/.zen/tmp/${MOATS}/${REGION}/RSS
|
||||
rm -f ~/.zen/tmp/${MOATS}/${REGION}/RSS/_${REGLAT}_${REGLON}.week.rss.json
|
||||
rm -f ~/.zen/tmp/${MOATS}/${REGION}/RSS/_${RLAT}_${RLON}.week.rss.json
|
||||
rm -f ~/.zen/tmp/${MOATS}/${REGION}/JOURNAL
|
||||
|
||||
## START WITH LOCAL SECTORS RSS WEEK
|
||||
RSSNODE=($(ls ~/.zen/tmp/${IPFSNODEID}/UPLANET/SECTORS/_${REGLAT}*_${REGLON}*/_${REGLAT}*_${REGLON}*/_${REGLAT}*_${REGLON}*.week.rss.json 2>/dev/null))
|
||||
RSSNODE=($(ls ~/.zen/tmp/${IPFSNODEID}/UPLANET/SECTORS/_${RLAT}*_${RLON}*/_${RLAT}*_${RLON}*/_${RLAT}*_${RLON}*.week.rss.json 2>/dev/null))
|
||||
for RSS in ${RSSNODE[@]}; do
|
||||
[[ $(cat ${RSS}) != "[]" ]] \
|
||||
&& cp ${RSS} ~/.zen/tmp/${MOATS}/${REGION}/RSS/ \
|
||||
@ -121,7 +121,7 @@ for REGION in ${REGIONS[@]}; do
|
||||
" >> ~/.zen/tmp/${MOATS}/${REGION}/JOURNAL
|
||||
|
||||
## ADD SWARM SECTORS RSS WEEK
|
||||
RSSWARM=($(ls ~/.zen/tmp/swarm/*/UPLANET/SECTORS/_${REGLAT}*_${REGLON}*/_${REGLAT}*_${REGLON}*/_${REGLAT}*_${REGLON}*.week.rss.json 2>/dev/null))
|
||||
RSSWARM=($(ls ~/.zen/tmp/swarm/*/UPLANET/SECTORS/_${RLAT}*_${RLON}*/_${RLAT}*_${RLON}*/_${RLAT}*_${RLON}*.week.rss.json 2>/dev/null))
|
||||
for RSS in ${RSSWARM[@]}; do
|
||||
[[ $(cat ${RSS}) != "[]" ]] \
|
||||
&& cp ${RSS} ~/.zen/tmp/${MOATS}/${REGION}/RSS/ \
|
||||
@ -135,21 +135,21 @@ for REGION in ${REGIONS[@]}; do
|
||||
## REMOVE SECTORS PARTS
|
||||
rm -f ~/.zen/tmp/${MOATS}/${REGION}/RSS/*.week.rss.json
|
||||
|
||||
## MAKE FINAL _${REGLAT}_${REGLON}.week.rss.json
|
||||
## MAKE FINAL _${RLAT}_${RLON}.week.rss.json
|
||||
mv ~/.zen/tmp/${MOATS}/${REGION}/RSS/.all.json \
|
||||
~/.zen/tmp/${MOATS}/${REGION}/RSS/_${REGLAT}_${REGLON}.week.rss.json
|
||||
~/.zen/tmp/${MOATS}/${REGION}/RSS/_${RLAT}_${RLON}.week.rss.json
|
||||
|
||||
## PREPARING JOURNAL
|
||||
mkdir -p ~/.zen/tmp/${IPFSNODEID}/UPLANET/REGIONS/_${REGLAT}_${REGLON}
|
||||
mkdir -p ~/.zen/tmp/${IPFSNODEID}/UPLANET/REGIONS/_${RLAT}_${RLON}
|
||||
|
||||
###################################
|
||||
## NODE PUBLISH REGION TODATENS LINK
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; url='/ipns/${TODATEREGIONNS}'\" />/_${REGLAT}_${REGLON}" \
|
||||
> ~/.zen/tmp/${IPFSNODEID}/UPLANET/REGIONS/_${REGLAT}_${REGLON}/_index.html
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; url='/ipns/${TODATEREGIONNS}'\" />/_${RLAT}_${RLON}" \
|
||||
> ~/.zen/tmp/${IPFSNODEID}/UPLANET/REGIONS/_${RLAT}_${RLON}/_index.html
|
||||
|
||||
#~ ## DEMO : PREPARE Ask.IA link - PROD will be launched during RUNTIME.
|
||||
#~ echo "<meta http-equiv=\"refresh\" content=\"0; url='https://api.copylaradio.com/tellme/?cid=/ipfs/${RWEEKCID}'\" />" \
|
||||
#~ > ~/.zen/tmp/${MOATS}/${REGION}/Ask.IA._${REGLAT}_${REGLON}.redir.html
|
||||
#~ > ~/.zen/tmp/${MOATS}/${REGION}/Ask.IA._${RLAT}_${RLON}.redir.html
|
||||
|
||||
TOTL=$((${NL}+${NS}))
|
||||
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
@ -162,10 +162,10 @@ for REGION in ${REGIONS[@]}; do
|
||||
RWEEKCID=$(ipfs add -q ~/.zen/tmp/${MOATS}/${REGION}/JOURNAL 2>/dev/null)
|
||||
if [[ ${RWEEKCID} ]]; then
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; url='/ipfs/QmYNH85cJCwSVw4c7SyHtc2jtgh7dL5RegozX7e8Re28a9/md.htm?src=/ipfs/${RWEEKCID}'\" />" \
|
||||
> ~/.zen/tmp/${MOATS}/${REGION}/Journal._${REGLAT}_${REGLON}.view.html
|
||||
> ~/.zen/tmp/${MOATS}/${REGION}/Journal._${RLAT}_${RLON}.view.html
|
||||
|
||||
cp ~/.zen/tmp/${MOATS}/${REGION}/JOURNAL \
|
||||
~/.zen/tmp/${IPFSNODEID}/UPLANET/REGIONS/_${REGLAT}_${REGLON}/JOURNAL.md
|
||||
~/.zen/tmp/${IPFSNODEID}/UPLANET/REGIONS/_${RLAT}_${RLON}/JOURNAL.md
|
||||
fi
|
||||
|
||||
IPFSPOP=$(ipfs add -rwq ~/.zen/tmp/${MOATS}/${REGION}/* | tail -n 1)
|
||||
|
@ -45,10 +45,10 @@ 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}"
|
||||
SLAT="${LAT::-1}"
|
||||
SLON="${LON::-1}"
|
||||
|
||||
MYSECTORS=("_${SECLAT}_${SECLON}" ${MYSECTORS[@]})
|
||||
MYSECTORS=("_${SLAT}_${SLON}" ${MYSECTORS[@]})
|
||||
|
||||
done
|
||||
|
||||
@ -304,9 +304,9 @@ for SECTOR in ${SECTORS[@]}; do
|
||||
|
||||
###########################################################################################
|
||||
### APPLY ON APP MODEL TODATE REGIONNS LINKING
|
||||
REGLAT=$(echo ${SLAT} | cut -d '.' -f 1)
|
||||
REGLON=$(echo ${SLON} | cut -d '.' -f 1)
|
||||
REGION="_${REGLAT}_${REGLON}"
|
||||
RLAT=$(echo ${SLAT} | cut -d '.' -f 1)
|
||||
RLON=$(echo ${SLON} | cut -d '.' -f 1)
|
||||
REGION="_${RLAT}_${RLON}"
|
||||
TODATEREGIONNS=$(${MY_PATH}/../tools/keygen -t ipfs "${TODATE}${UPLANETNAME}${REGION}" "${TODATE}${UPLANETNAME}${REGION}")
|
||||
REGIONG1PUB=$(${MY_PATH}/../tools/keygen -t duniter "${TODATE}${UPLANETNAME}${REGION}" "${TODATE}${UPLANETNAME}${REGION}")
|
||||
|
||||
@ -327,7 +327,7 @@ for SECTOR in ${SECTORS[@]}; do
|
||||
-e "s~_LON_~${SLON}~g" \
|
||||
-e "s~_EARTHCID_~${EARTHCID}~g" \
|
||||
-e "s~_DATE_~$(date +%A-%d_%m_%Y)~g" \
|
||||
-e "s~_UPLANETLINK_~${EARTHCID}/map_render.html\?southWestLat=${REGLAT}\&southWestLon=${REGLON}\°=1~g" \
|
||||
-e "s~_UPLANETLINK_~${EARTHCID}/map_render.html\?southWestLat=${RLAT}\&southWestLon=${RLON}\°=1~g" \
|
||||
-e "s~http://127.0.0.1:8080~~g" \
|
||||
> ~/.zen/tmp/${MOATS}/${SECTOR}/_index.html
|
||||
|
||||
@ -367,15 +367,15 @@ for SECTOR in ${SECTORS[@]}; do
|
||||
echo "(☉_☉ ) ${REGION}.week.rss.json (☉_☉ )"
|
||||
|
||||
rm -Rf ~/.zen/tmp/${IPFSNODEID}/SECTORS/ ## TODO REMOVE
|
||||
mkdir -p ~/.zen/tmp/${IPFSNODEID}/UPLANET/SECTORS/_${REGLAT}_${REGLON}/_${SLAT}_${SLON}
|
||||
mkdir -p ~/.zen/tmp/${IPFSNODEID}/UPLANET/SECTORS/_${RLAT}_${RLON}/_${SLAT}_${SLON}
|
||||
## CREATING 7 DAYS JSON RSS STREAM
|
||||
tiddlywiki --load ${INDEX} \
|
||||
--output ~/.zen/tmp/${IPFSNODEID}/UPLANET/SECTORS/_${REGLAT}_${REGLON}/_${SLAT}_${SLON} --render '.' "${SECTOR}.week.rss.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[days:created[-7]!is[system]!tag[G1Voeu]]'
|
||||
--output ~/.zen/tmp/${IPFSNODEID}/UPLANET/SECTORS/_${RLAT}_${RLON}/_${SLAT}_${SLON} --render '.' "${SECTOR}.week.rss.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[days:created[-7]!is[system]!tag[G1Voeu]]'
|
||||
|
||||
###################################
|
||||
## NODE CACHE SECTOR TODATENS
|
||||
echo "<meta http-equiv=\"refresh\" content=\"0; url='/ipns/${TODATENS}'\" />_${SLAT}_${SLON}" \
|
||||
> ~/.zen/tmp/${IPFSNODEID}/UPLANET/SECTORS/_${REGLAT}_${REGLON}/_${SLAT}_${SLON}/_index.html
|
||||
> ~/.zen/tmp/${IPFSNODEID}/UPLANET/SECTORS/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_index.html
|
||||
|
||||
## TODO FILTER INFORMATION WITH MULTIPLE SIGNATURES (DONE in REGION.refresh.sh)
|
||||
## TODO EXPORT AS RSS ## https://talk.tiddlywiki.org/t/has-anyone-generated-an-rss-feed-from-tiddlywiki/966/28
|
||||
|
@ -58,11 +58,11 @@ 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}"
|
||||
SLAT="${LAT::-1}"
|
||||
SLON="${LON::-1}"
|
||||
## REGION
|
||||
REGLAT=$(echo ${LAT} | cut -d '.' -f 1)
|
||||
REGLON=$(echo ${LON} | cut -d '.' -f 1)
|
||||
RLAT=$(echo ${LAT} | cut -d '.' -f 1)
|
||||
RLON=$(echo ${LON} | cut -d '.' -f 1)
|
||||
|
||||
##############################################################
|
||||
## UMAP WALLET CHECK
|
||||
@ -459,9 +459,9 @@ 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}"
|
||||
SECTOR="_${SECLAT}_${SECLON}"
|
||||
SLAT="${LAT::-1}"
|
||||
SLON="${LON::-1}"
|
||||
SECTOR="_${SLAT}_${SLON}"
|
||||
TODATESECTORNS=$(${MY_PATH}/../tools/keygen -t ipfs "${TODATE}${UPLANETNAME}${SECTOR}" "${TODATE}${UPLANETNAME}${SECTOR}")
|
||||
|
||||
PHONEBOOTH="${G1PUB::30}"
|
||||
|
@ -30,10 +30,10 @@ start=`date +%s`
|
||||
## CORRESPONDING REGION UKEY
|
||||
LAT=$(echo ${SECTOR} | cut -d '_' -f 2)
|
||||
LON=$(echo ${SECTOR} | cut -d '_' -f 3)
|
||||
REGLAT=$(echo ${LAT} | cut -d '.' -f 1)
|
||||
REGLON=$(echo ${LON} | cut -d '.' -f 1)
|
||||
RLAT=$(echo ${LAT} | cut -d '.' -f 1)
|
||||
RLON=$(echo ${LON} | cut -d '.' -f 1)
|
||||
|
||||
REGION="_${REGLAT}_${REGLON}"
|
||||
REGION="_${RLAT}_${RLON}"
|
||||
${MY_PATH}/../tools/keygen -t duniter -o ~/.zen/tmp/${MOATS}/${REGION}.priv "${UPLANETNAME}${REGION}" "${UPLANETNAME}${REGION}"
|
||||
REGIONG1PUB=$(cat ~/.zen/tmp/${MOATS}/${REGION}.priv | grep "pub:" | cut -d ' ' -f 2)
|
||||
[[ ! ${REGIONG1PUB} ]] && echo "ERROR generating REGION WALLET" && exit 1
|
||||
|
@ -32,10 +32,10 @@ LAT=$(echo ${UMAP} | cut -d '_' -f 2)
|
||||
LON=$(echo ${UMAP} | cut -d '_' -f 3)
|
||||
|
||||
## SECTOR COORD
|
||||
SECLAT="${LAT::-1}"
|
||||
SECLON="${LON::-1}"
|
||||
SLAT="${LAT::-1}"
|
||||
SLON="${LON::-1}"
|
||||
|
||||
SECTOR="_${SECLAT}_${SECLON}"
|
||||
SECTOR="_${SLAT}_${SLON}"
|
||||
|
||||
${MY_PATH}/../tools/keygen -t duniter -o ~/.zen/tmp/${MOATS}/${SECTOR}.priv "${UPLANETNAME}${SECTOR}" "${UPLANETNAME}${SECTOR}"
|
||||
SECTORG1PUB=$(cat ~/.zen/tmp/${MOATS}/${SECTOR}.priv | grep "pub:" | cut -d ' ' -f 2)
|
||||
|
43
tools/getUMAP_ENV.sh
Executable file
43
tools/getUMAP_ENV.sh
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/bah
|
||||
##################################################
|
||||
## Get TODATE G1PUB & IPNS values for LAT / LON
|
||||
##################################################
|
||||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
ME="${0##*/}"
|
||||
|
||||
. "${MY_PATH}/my.sh"
|
||||
|
||||
## INIT
|
||||
LAT="$1"
|
||||
LON="$2"
|
||||
ZLAT=$(makecoord ${LAT})
|
||||
ZLON=$(makecoord ${LON})
|
||||
## CHECK
|
||||
[[ "$ZLAT" != "$LAT" ]] && echo "ERROR - LAT bad format -" && exit 1
|
||||
[[ "$ZLON" != "$LON" ]] && echo "ERROR - LON bad format -" && exit 1
|
||||
|
||||
## CONTINUE
|
||||
echo "UMAP : _${LAT}_${LON}"
|
||||
SLAT="${LAT::-1}"
|
||||
SLON="${LON::-1}"
|
||||
echo "SECTOR : _${SLAT}_${SLON}"
|
||||
RLAT="$(echo ${LAT} | cut -d '.' -f 1)"
|
||||
RLON="$(echo ${LAT} | cut -d '.' -f 1)"
|
||||
echo "REGION : _${RLAT}_${RLON}"
|
||||
|
||||
## COMPUTE
|
||||
UMAPIPNS="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/TODATENS | tail -n 1)
|
||||
[[ ! $UMAPIPNS ]] && UMAPIPNS="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/TODATENS | tail -n 1)
|
||||
UMAPG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/G1PUB | tail -n 1)
|
||||
[[ ! $UMAPG1PUB ]] && UMAPG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/G1PUB | tail -n 1)
|
||||
|
||||
SECTORIPNS="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/SECTORNS | tail -n 1)
|
||||
[[ ! $SECTORIPNS ]] && SECTORIPNS="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/SECTORNS | tail -n 1)
|
||||
SECTORG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/SECTORG1PUB | tail -n 1)
|
||||
[[ ! $SECTORG1PUB ]] && SECTORG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/SECTORG1PUB | tail -n 1)
|
||||
|
||||
REGIONIPNS="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}REGIONNS | tail -n 1)
|
||||
[[ ! $REGIONIPNS ]] && REGIONIPNS="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/REGIONNS | tail -n 1)
|
||||
REGIONG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}/REGIONG1PUB | tail -n 1)
|
||||
[[ ! $REGIONG1PUB ]] && REGIONG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_${RLAT}_${RLON}/_${SLAT}_${SLON}/_${LAT}_${LON}REGIONG1PUB | tail -n 1)
|
19
tools/ipfs_prompts.sh
Executable file
19
tools/ipfs_prompts.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
########################################################
|
||||
# this script show (extreme control) ipfs commands
|
||||
#########################################################
|
||||
|
||||
#############################
|
||||
# remove all pins from node
|
||||
echo "UNPIN ALL"
|
||||
echo "ipfs pin ls -q --type recursive | xargs ipfs pin rm"
|
||||
|
||||
#############################
|
||||
# empty garbage collector
|
||||
echo "EMPTY GC"
|
||||
echo "ipfs repo gc"
|
||||
|
||||
#############################
|
||||
# get IPNS actual CID
|
||||
echo "ipfs name resolve $ipnskey"
|
||||
|
@ -98,9 +98,9 @@ if [[ ! -d $img_dir ]]; then
|
||||
|
||||
## WRITE ON IT : ASK FOR REFILL
|
||||
convert -font 'Liberation-Sans' \
|
||||
-pointsize 80 -fill purple -draw 'text 50,120 "'"$ZEN Zen"'"' \
|
||||
-pointsize 30 -fill purple -draw 'text 40, 180 "'"$PLAYER"'"' \
|
||||
-pointsize 14 -fill white -draw 'text 40, 200 "'"${birthdate}"'"' \
|
||||
-pointsize 80 -fill white -draw 'text 50,120 "'"$ZEN Zen"'"' \
|
||||
-pointsize 30 -fill white -draw 'text 40, 180 "'"$PLAYER"'"' \
|
||||
-pointsize 14 -fill purple -draw 'text 40, 200 "'"${birthdate}"'"' \
|
||||
"${HOME}/.zen/tmp/one.png" "${HOME}/.zen/tmp/carousel/${pub}.png" \
|
||||
&& rm ${HOME}/.zen/tmp/carousel/${pub}.one.png
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user