diff --git a/12345.sh b/12345.sh index 8c31d1e3..af1f11ba 100755 --- a/12345.sh +++ b/12345.sh @@ -86,12 +86,15 @@ while true; do myHtml >> ~/.zen/tmp/${MOATS}/${PORT}.myHOST.http ## REPLACE RESPONSE PORT - sed -i -e "s~http://127.0.0.1:12345~http://${myIP}:${PORT}~g" \ + sed -i -e "s~http://127.0.0.1:12345~http://127.0.0.1:${PORT}~g" \ ~/.zen/tmp/${MOATS}/${PORT}.myHOST.http ## WAN REDIRECT TO HTTPS:// + /${PORT} [ -z "$isLAN" ] \ - && sed -i -e "s~http://${myIP}:${PORT}~${myASTROPORT}/${PORT}~g" ~/.zen/tmp/${MOATS}/${PORT}.myHOST.http + && sed -i -e "s~http://127.0.0.1:${PORT}~${myASTROPORT}/${PORT}~g" ~/.zen/tmp/${MOATS}/${PORT}.myHOST.http + + [ -n "$(zIp)" ]\ + && sed -i -e "s~http://127.0.0.1:${PORT}~$(zIp):${PORT}~g" ~/.zen/tmp/${MOATS}/${PORT}.myHOST.http ## UPLANET HOME LINK REPLACEMENT sed -i -e "s~https://qo-op.com~${myUPLANET}~g" ~/.zen/tmp/${MOATS}/${PORT}.myHOST.http diff --git a/20h12.process.sh b/20h12.process.sh index 56e0df51..c10183ca 100755 --- a/20h12.process.sh +++ b/20h12.process.sh @@ -27,9 +27,6 @@ while [[ ! $(netstat -tan | grep 5001 | grep LISTEN) ]]; do && exit 1 done -## PING BOOSTRAP & SWARM NODES -${MY_PATH}/ping_bootstrap.sh - # show ZONE.sh cache of the day echo "TODAY UPlanet landings" ls ~/.zen/tmp/ZONE_* 2>/dev/null @@ -57,8 +54,12 @@ git pull ${MY_PATH}/youtube-dl.sh sudo youtube-dl -U +## DRAGON SSH WOT +echo "DRAGONS WOT OFF" +${MY_PATH}/RUNTIME/DRAGON_p2p_ssh.sh off + ## PING BOOSTRAP & SWARM NODES -${MY_PATH}/ping_bootstrap.sh +${MY_PATH}/ping_bootstrap.sh > /dev/null 2>&1 ##################################### # espeak "Players refresh" > /dev/null 2>&1 @@ -99,16 +100,14 @@ seconds=$((dur % 60)) echo "DURATION ${hours} hours ${minutes} minutes ${seconds} seconds" echo "20H12 (♥‿‿♥) Execution time was $dur seconds." -## DRAGON SSH WOT -echo "DRAGONS WOT OFF" -${MY_PATH}/RUNTIME/DRAGON_p2p_ssh.sh off -## RESTART ## MAIL LOG : support@qo-op.com ## ${MY_PATH}/tools/mailjet.sh "support@qo-op.com" "/tmp/20h12.log" "20H12" espeak "DURATION ${hours} hours ${minutes} minutes ${seconds} seconds" > /dev/null 2>&1 +## RESTART + # espeak "Restarting Astroport Services" > /dev/null 2>&1 ## CLOSING API PORT [[ -s ~/.zen/.pid ]] && kill -9 $(cat ~/.zen/.pid) > /dev/null 2>&1 diff --git a/API/DRAGONS.sh b/API/DRAGONS.sh new file mode 100755 index 00000000..12dd0768 --- /dev/null +++ b/API/DRAGONS.sh @@ -0,0 +1,79 @@ +################################################################################ +# Author: Fred (support@qo-op.com) +# Version: 0.1 +# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) +################################################################################ +################################################################################ +## API: DRAGONS +## Used by OSM2IPFS welcome.html +# ?zone=DEG&ulat=LAT&ulon=LON +## Search for TW numbers in received zone # >> return json +################################################################################ +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +. "${MY_PATH}/../tools/my.sh" + +start=`date +%s` + +echo "PORT=$1 +THAT=$2 +AND=$3 +THIS=$4 +APPNAME=$5 +WHAT=$6 +OBJ=$7 +VAL=$8 +MOATS=$9 +COOKIE=$10" +PORT="$1" THAT="$2" AND="$3" THIS="$4" APPNAME="$5" WHAT="$6" OBJ="$7" VAL="$8" MOATS="$9" COOKIE="$10" +### transfer variables according to script + +[[ $MOATS == "" ]] && echo "MISSING MOATS" && exit 1 + +HTTPCORS="HTTP/1.1 200 OK +Access-Control-Allow-Origin: * +Access-Control-Allow-Credentials: true +Access-Control-Allow-Methods: GET +Server: Astroport.ONE +Content-Type: text/html; charset=UTF-8 + +" + +function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } + +# PREPARE HTTP RESPONSE (application/json) +mkdir -p ~/.zen/tmp/${MOATS}/ +echo "${HTTPCORS}" > ~/.zen/tmp/${MOATS}/http +sed -i "s~text/html~application/json~g" ~/.zen/tmp/${MOATS}/http + +# ------------------------------------------------------------------- # +# GET/?dragons +# ------------------------------------------------------------------- # +## RUNNING UPLANET STATIONS GPS DETECTION +rm ~/.zen/tmp/DRAGONS.json + +if [[ ! -s ~/.zen/tmp/DRAGONS.json ]]; then + + echo " ## cat ***/GPS.json" + cat ~/.zen/tmp/${IPFSNODEID}/GPS.json 2>/dev/null | jq -c '.[] + {ipfsnodeid: "'$IPFSNODEID'"}' > ~/.zen/tmp/${MOATS}/gps.grid + cat ~/.zen/tmp/swarm/12D*/GPS.json 2>/dev/null | jq -c '.[] + {ipfsnodeid: "'$IPFSNODEID'"}' | sort -u >> ~/.zen/tmp/${MOATS}/gps.grid + + cat ~/.zen/tmp/${MOATS}/gps.grid | jq -s '.' | sed -e 's/\[/[/' -e 's/\]/]/' -e 's/},{/},\n{/g' > ~/.zen/tmp/DRAGONS.json +fi + +#~ jq 'unique_by(.umap)' ~/.zen/tmp/DRAGONS.json > ~/.zen/tmp/DRAGONS_no_duplicates.json +#~ mv ~/.zen/tmp/DRAGONS_no_duplicates.json ~/.zen/tmp/DRAGONS.json +echo " ***** WELCOME DRAGONS =========== " +cat ~/.zen/tmp/DRAGONS.json + +### SEND RESPONSE ON PORT +cat ~/.zen/tmp/DRAGONS.json >> ~/.zen/tmp/${MOATS}/http +( + cat ~/.zen/tmp/${MOATS}/http | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 + rm -Rf ~/.zen/tmp/${MOATS} && echo "BLURP DRAGONS.json" +) & + +## TIMING +end=`date +%s` +echo "(DRAGONS) Operation time was "`expr $end - $start` seconds. +exit 0 diff --git a/API/QRCODE.sh b/API/QRCODE.sh index 1dabb68f..b1c7a27b 100755 --- a/API/QRCODE.sh +++ b/API/QRCODE.sh @@ -102,9 +102,13 @@ if [[ ${QRCODE} == "station" ]]; then ISTATION=$(cat ~/.zen/tmp/ISTATION) fi + ## LOG IPFSNODEID : IPCity + Wheater + more... + ${MY_PATH}/../tools/IPFSNODEID.weather.sh > ~/.zen/tmp/${IPFSNODEID}/weather.txt + echo "" > ~/.zen/tmp/${IPFSNODEID}/_index.html + ## SHOW ZenStation FRONT sed "s~_STATION_~${myIPFS}${ISTATION}/~g" $MY_PATH/../templates/ZenStation/index.html > ~/.zen/tmp/${MOATS}/index.htm - [[ ! $isLAN ]] && sed -i "s~MENU~HOSTING~g" ~/.zen/tmp/${MOATS}/index.htm + sed -i "s~2L8vaYixCf97DMT8SistvQFeBj7vb6RQL7tvwyiv1XVH~${WORLDG1PUB}~g" ~/.zen/tmp/${MOATS}/index.htm sed -i "s~http://127.0.0.1:8080~${myIPFS}~g" ~/.zen/tmp/${MOATS}/index.htm sed -i "s~http://127.0.0.1:33101~${myG1BILLET}~g" ~/.zen/tmp/${MOATS}/index.htm sed -i "s~http://astroport.localhost:1234~${myASTROPORT}~g" ~/.zen/tmp/${MOATS}/index.htm @@ -491,7 +495,7 @@ if [[ ${QRCODE:0:5} == "@@@@@" ]]; then && ipfs name publish -k ${player}_${VoeuName} /ipfs/${MILGRAM} & ) & - echo "
PLEASE RETRY IN 30 SECONDS GETTING MESSAGE FROM IPFS
" >> ~/.zen/tmp/${MOATS}/disco + echo "
PLEASE RETRY IN 30 SECONDS GETTING MESSAGE FROM IPFS" >> ~/.zen/tmp/${MOATS}/disco ( cat ~/.zen/tmp/${MOATS}/disco | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 echo "BLURP $PORT" && rm -Rf ~/.zen/tmp/${MOATS} @@ -609,7 +613,7 @@ if [[ ${QRCODE:0:2} == "G1" && ${AND} == "tw" ]]; then ############################################## echo "## IPNS G1Voeu APP REDIRECT" tiddlywiki --load ${INDEX} --output ~/.zen/tmp --render '.' "${MOATS}.g1voeu.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[G1Voeu]]' - cat ~/.zen/tmp/${MOATS}.g1voeu.json | jq -r '.[].wish' > ~/.zen/tmp/${MOATS}.g1wishes.txt + cat ~/.zen/tmp/${MOATS}.g1voeu.json | jq -r 'map(select(.wish != null)) | .[].wish' > ~/.zen/tmp/${MOATS}.g1wishes.txt cat ~/.zen/tmp/${MOATS}.g1wishes.txt while read WISH do @@ -646,6 +650,7 @@ fi ################################################################################ ## QRCODE = IPNS or G1PUB ? Can be ASTRONAUTENS or G1PUB format ZCHK="$(echo $THAT | cut -d ':' -f 2-)" # ChK or ZEN +[[ $ZCHK == $THAT ]] && ZCHK="" QRCODE="${QRCODE%%:*}" ## TRIM :ChK ################################################################################ ################################################################################ @@ -655,7 +660,7 @@ echo "IPNS2G1=${IPNS2G1} ZCHK=${ZCHK}" [[ ${ZCHK} == "" && ${#IPNS2G1} -ge 40 && ${QRCODE::4} == "12D3" ]] \ && echo "${PORT} QRCODE IS IPNS ADDRESS : ${myIPFS}/ipns/${QRCODE}" \ && (echo "$HTTPCORS Loading from IPFS" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) \ - && echo "PRULS /ipns/${QRCODE} $PORT" && rm -Rf ~/.zen/tmp/${MOATS} \ + && echo "GLUPS /ipns/${QRCODE} $PORT" && rm -Rf ~/.zen/tmp/${MOATS} \ && exit 0 ## TEST G1 TYPE ( try g1_to_ipfs ) @@ -663,7 +668,7 @@ ASTROTOIPNS=$(${MY_PATH}/../tools/g1_to_ipfs.py ${QRCODE} 2>/dev/null) [[ ! ${ASTROTOIPNS} ]] \ && echo "${PORT} INVALID QRCODE : ${QRCODE}" \ && (echo "$HTTPCORS ERROR - INVALID QRCODE : ${QRCODE}" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) \ - && echo "PRULS INVALID ${QRCODE} $PORT" && rm -Rf ~/.zen/tmp/${MOATS} \ + && echo "GLUPS INVALID ${QRCODE} $PORT" && rm -Rf ~/.zen/tmp/${MOATS} \ && exit 1 ################################################################################ echo "############################################################################" @@ -678,29 +683,23 @@ echo ">>> ${QRCODE} g1_to_ipfs $ASTROTOIPNS" && ZEN=$(echo "($VISITORCOINS - 1) * 10" | bc | cut -d '.' -f 1) \ || ZEN="-10" - DISPLAY="$VISITORCOINS G1" + DISPLAY="

$VISITORCOINS G1

" ## WALLET VIERGE ########################################### if [[ $VISITORCOINS == "null" || ${ZEN} -lt 10 ]]; then - echo "!! LOW ZEN WALLET ZEN=${ZEN}" + DISPLAY="$DISPLAY +

!! LOW ZEN WALLET ZEN=${ZEN}

" - echo "${HTTPCORS}" > ~/.zen/tmp/${MOATS}/index.redirect - echo "

LOW ZEN WARNING

- PLEASE CHARGE... only ${ZEN} ZEN - " >> ~/.zen/tmp/${MOATS}/index.redirect - ( - cat ~/.zen/tmp/${MOATS}/index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 - echo "BLURP null ZEN $PORT" && rm -Rf ~/.zen/tmp/${MOATS} - ) & - exit 0 + DISPLAY="$DISPLAY

LOW ZEN WARNING

+ PLEASE CHARGE... ${ZEN} ZEN" fi ## WE SEND WALLET AMOUNT DISPLAY ( - echo "$HTTPCORS

${ZCHK}:${QRCODE}

${DISPLAY}

SCAN WALLET

" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 + echo "$HTTPCORS ${QRCODE}:${ZCHK}:${DISPLAY}

SCAN WALLET

" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 echo "BLURP ${DISPLAY} $PORT" && rm -Rf ~/.zen/tmp/${MOATS} ) & diff --git a/API/ZONE.sh b/API/ZONE.sh index 0e44881d..a647ccbf 100755 --- a/API/ZONE.sh +++ b/API/ZONE.sh @@ -111,9 +111,9 @@ if [[ ! -s ~/.zen/tmp/${JSON} ]]; then UMAPNS=$(ipfs key import ${G1PUB} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/${UMAP}.priv) 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 - cp ~/.zen/tmp/${MOATS}.http.grid ~/.zen/tmp/${JSON} + cp ~/.zen/tmp/${MOATS}/http.grid ~/.zen/tmp/${JSON} cat ~/.zen/tmp/${JSON} >> ~/.zen/tmp/${MOATS}.http cat ~/.zen/tmp/${MOATS}.http | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 & @@ -127,44 +127,51 @@ if [[ ! -s ~/.zen/tmp/${JSON} ]]; then ############################################## ## SEARCH FOR UPLANET TW NUMBERS IN THAT ZONE - echo '{ "gridNumbers": [' >> ~/.zen/tmp/${MOATS}.http.grid + echo '{ "gridNumbers": [' >> ~/.zen/tmp/${MOATS}/http.grid for i in $(seq 0 9); do - ZLAT=$(echo "$LAT + ${DEG} * $i" | bc -l ) + + ZLAT=$(echo "$LAT + ${DEG} * $i" | bc -l) [[ -z ${ZLAT} ]] && ZLAT=0 - # [[ ! $(echo $ZLAT | grep "\." ) ]] && ZLAT="${ZLAT}." - for j in $(seq 0 9); do - ZLON=$(echo "$LON + ${DEG} * $j" | bc -l ) - [[ -z ${ZLON} ]] && ZLON=0 - # [[ ! $(echo $ZLON | grep "\." ) ]] && ZLON="${ZLON}." - echo " ## SEARCH UPLANET/__/_*_*/_*.?_*.?/_${ZLAT}*_${ZLON}*" - swarmnum=$(ls -d ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${ZLAT}*_${ZLON}*/TW/* 2>/dev/null | wc -l ) - nodenum=$(ls -d ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${ZLAT}*_${ZLON}*/TW/* 2>/dev/null | wc -l ) - totnum=$(( swarmnum + nodenum )) - [[ $totnum -gt 9 ]] && displaynum="X" || displaynum=$totnum + for j in $(seq 0 9); do - [[ $displaynum != "0" ]] && echo '{"lat": '${ZLAT}', "lon": '${ZLON}', "number": "'${displaynum}'", "ipns": "'${ZONEINDEX}'" } - ,' >> ~/.zen/tmp/${MOATS}.http.grid \ - && echo "${DEG} :" '{"lat": '${ZLAT}', "lon": '${ZLON}', "number": "'${totnum}'", "ipns": "'${ZONEINDEX}'" }' + ZLON=$(echo "$LON + ${DEG} * $j" | bc -l) + [[ -z ${ZLON} ]] && ZLON=0 + + echo " ## SEARCH UPLANET/__/_*_*/_*.?_*.?/_${ZLAT}*_${ZLON}*" + swarmnum=$(ls -d ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${ZLAT}*_${ZLON}*/TW/* 2>/dev/null | wc -l ) + nodenum=$(ls -d ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${ZLAT}*_${ZLON}*/TW/* 2>/dev/null | wc -l ) + totnum=$(( swarmnum + nodenum )) + + [[ $totnum -gt 9 ]] && displaynum="X" || displaynum=$totnum + + [[ $displaynum != "0" ]] && echo '{"lat": '${ZLAT}', "lon": '${ZLON}', "number": "'${displaynum}'", "ipns": "'${ZONEINDEX}'" } + ,' >> ~/.zen/tmp/${MOATS}/http.grid \ + && echo "${DEG} :" '{"lat": '${ZLAT}', "lon": '${ZLON}', "number": "'${totnum}'", "ipns": "'${ZONEINDEX}'" }' + + done - done done - sed -i '$ d' ~/.zen/tmp/${MOATS}.http.grid ## REMOVE LAST ',' - echo ']}' >> ~/.zen/tmp/${MOATS}.http.grid + [[ ! $(cat ~/.zen/tmp/${MOATS}/http.grid | tail -n 1 | grep 'gridNumbers' ) ]] \ + && sed -i '$ d' ~/.zen/tmp/${MOATS}/http.grid ## REMOVE LAST ',' + + echo ']}' >> ~/.zen/tmp/${MOATS}/http.grid echo "## ADD TO CACHE ~/.zen/tmp/${JSON}" - cp ~/.zen/tmp/${MOATS}.http.grid ~/.zen/tmp/${JSON} + cp ~/.zen/tmp/${MOATS}/http.grid ~/.zen/tmp/${JSON} fi +cat ~/.zen/tmp/${JSON} | jq -c + ### SEND RESPONSE ON PORT cat ~/.zen/tmp/${JSON} >> ~/.zen/tmp/${MOATS}.http ( cat ~/.zen/tmp/${MOATS}.http | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 - rm ~/.zen/tmp/${MOATS}.http.grid 2>/dev/null + rm ~/.zen/tmp/${MOATS}/http.grid 2>/dev/null rm ~/.zen/tmp/${MOATS}.http && echo "BLURP ${JSON}" ) & ## CLEANING diff --git a/APY/addfile.sh b/APY/addfile.sh new file mode 100755 index 00000000..76d0a9a4 --- /dev/null +++ b/APY/addfile.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# Usage: bash addfile.sh + +filename="$1" +mime_type="$2" +file_type="$3" + +echo "Processing file: $filename" +echo "MIME type: $mime_type" +echo "File type: $file_type" + +# Check file type and perform corresponding treatment +case $file_type in + "video") + if [[ $mime_type == *"video"* ]]; then + # Video processing logic + echo "Video processing..." + # Add more processing steps as needed + else + echo "Invalid file type for video processing" + fi + ;; + "audio") + if [[ $mime_type == *"audio"* ]]; then + # Audio processing logic + echo "Audio processing..." + # Add more processing steps as needed + else + echo "Invalid file type for audio processing" + fi + ;; + "text") + if [[ $mime_type == *"text"* ]]; then + # Text processing logic + echo "Text processing..." + # Add more processing steps as needed + else + echo "Invalid file type for text processing" + fi + ;; + *) + echo "Unknown file type: $file_type" + ;; +esac + +echo "File processing complete." diff --git a/APY/upload_video.10101.py b/APY/upload_video.10101.py new file mode 100755 index 00000000..ac6c78a5 --- /dev/null +++ b/APY/upload_video.10101.py @@ -0,0 +1,170 @@ +#!/usr/bin/python3 +from fastapi import FastAPI, File, UploadFile, Form, HTTPException +from fastapi.responses import HTMLResponse, JSONResponse +import subprocess +import os +import magic + +app = FastAPI() + +# HTML form for file upload +html_form = """ + + + + + + + File Upload and Processing + + + + +
+

File Upload and Processing

+
+ +
+ + + + + + + +
+ +
Loading...
+
+ +
+
+ + + + + + +""" + +@app.get("/") +async def read_root(): + return HTMLResponse(content=html_form, status_code=200) + +def get_mime_type(file: UploadFile): + mime = magic.Magic() + mime_type = mime.from_buffer(file.file.read(1024)) + return mime_type + +@app.post("/upload") +async def create_upload_file(file: UploadFile = File(...), convert_to: str = Form(...)): + # Validate file size + max_file_size = 100 * 1024 * 1024 # 100MB + if file.file.__sizeof__() > max_file_size: + raise HTTPException(status_code=400, detail="File size exceeds the limit of 100MB") + + # Check the file type + mime_type = get_mime_type(file) + print(f"Detected MIME type: {mime_type}") + + # Save the uploaded file to a temporary location + with open(file.filename, "wb") as f: + f.write(file.file.read()) + + # Continue with the processing logic + # Run the post-treatment Bash script + logs = subprocess.run(["bash", "addfile.sh", file.filename, mime_type, convert_to], capture_output=True, text=True).stdout + + # Optionally, you can remove the temporary file + os.remove(file.filename) + + return JSONResponse(content={"filename": file.filename, "mime_type": mime_type, "convert_to": convert_to, "message": "File processed successfully.", "logs": logs}) + +if __name__ == "__main__": + import uvicorn + + uvicorn.run(app, host="0.0.0.0", port=10101) diff --git a/ASTROBOT/G1Kodi.sh b/ASTROBOT/G1Kodi.sh index b6dc4f71..8a262666 100755 --- a/ASTROBOT/G1Kodi.sh +++ b/ASTROBOT/G1Kodi.sh @@ -168,8 +168,26 @@ while read TITRE; do TEXT="

{{!!titre}} ({{!!year}})

{{!!sub}}

{{!!desc}}
Bande Annonce -

Envoyez un don. Recevez le lien vers ce film dans votre messagerie Cesium+

- " +
+

Voir ce Film:

+

Installez Cesium+

+ + + + + + +
+ + + +
+

Flashez, envoyez un don...

+
ce soir,
recevez le lien dans votre messagerie. +
+ +
+ " ## MAKING TIDDLER echo "## Creation json tiddler ~/.zen/game/players/${PLAYER}/G1Kodi/${TITLE}.dragdrop.json" diff --git a/BOOSTRAP/OC_API.md b/BOOKS/OC_API.md similarity index 100% rename from BOOSTRAP/OC_API.md rename to BOOKS/OC_API.md diff --git a/BOOSTRAP/Readme.md b/BOOKS/Readme.md similarity index 99% rename from BOOSTRAP/Readme.md rename to BOOKS/Readme.md index ed8f275f..68017209 100644 --- a/BOOSTRAP/Readme.md +++ b/BOOKS/Readme.md @@ -123,7 +123,7 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEtg3SlRxtzsQnsBSeU83W0tvUyBTUvOU5lhjlbZVPCZ * “keygen” https://git.p2p.legal/STI/Astroport.ONE/src/branch/master/tools/keygen * “natools” https://git.p2p.legal/STI/Astroport.ONE/src/branch/master/tools/natools.py * “jaklis” https://git.p2p.legal/axiom-team/jaklis -* “ipfs” https://git.p2p.legal/STI/Astroport.ONE/src/branch/master/kubo_v0.20.0_linux.install.sh +* “ipfs” https://git.p2p.legal/STI/Astroport.ONE/src/branch/master/install.kubo_v0.20.0_linux.sh ## ASTROPORT CREW GILET https://astroport.myspreadshop.fr/create?product=a68ad31e-d554-4c75-821d-97b00d6ad13f&view=2 diff --git a/BOOKS/TheNetworkState.pdf b/BOOKS/TheNetworkState.pdf new file mode 100644 index 00000000..2dbda2a8 Binary files /dev/null and b/BOOKS/TheNetworkState.pdf differ diff --git a/docker-compose.duniter.yml b/DOCKER/docker-compose.duniter.yml similarity index 100% rename from docker-compose.duniter.yml rename to DOCKER/docker-compose.duniter.yml diff --git a/docker-compose.duniter1.8.7.yml b/DOCKER/docker-compose.duniter1.8.7.yml similarity index 100% rename from docker-compose.duniter1.8.7.yml rename to DOCKER/docker-compose.duniter1.8.7.yml diff --git a/docker-compose.minetest.yml b/DOCKER/docker-compose.minetest.yml similarity index 100% rename from docker-compose.minetest.yml rename to DOCKER/docker-compose.minetest.yml diff --git a/docker-compose.nextcloud.yml b/DOCKER/docker-compose.nextcloud.yml similarity index 100% rename from docker-compose.nextcloud.yml rename to DOCKER/docker-compose.nextcloud.yml diff --git a/docker-compose.nginx-proxy-manager.yml b/DOCKER/docker-compose.nginx-proxy-manager.yml similarity index 100% rename from docker-compose.nginx-proxy-manager.yml rename to DOCKER/docker-compose.nginx-proxy-manager.yml diff --git a/README.md b/README.md index 57f1977d..92cc9f0b 100644 --- a/README.md +++ b/README.md @@ -331,7 +331,9 @@ GET /?player=${PLAYER}&moa=json&tag=G1CopierYoutube > CAN BE EXTENDED ## ➤ AMZQR : Create a QRCode with "amzqr" -### ```/?amzqr=${URLENCODEDSTRING}&logo=${IMAGE}``` +```http +GET /?amzqr=${URLENCODEDSTRING}&logo=${IMAGE} +``` | Parameter | Type | Description | | :-------- | :------- | :-------------------------------- | @@ -341,7 +343,9 @@ GET /?player=${PLAYER}&moa=json&tag=G1CopierYoutube check available "logo.png" in [./images](./images) ## ➤ UPLANET : Create Umap, AstroID & ZenCard for PLAYER (email) -### ```/?uplanet=${PLAYER}&zlat=${LAT}&zlon=${LON}&g1pub=${PASS}``` +```http +GET /?uplanet=${PLAYER}&zlat=${LAT}&zlon=${LON}&g1pub=${PASS} +``` | Parameter | Type | Description | | :-------- | :------- | :-------------------------------- | @@ -473,12 +477,13 @@ http://localhost:12345 renvoi un json | created | date de creation du document | | hostname | nom de la station | | myIP | adresse IP de la station | -| ipfsnodeid | date de creation du document | +| ipfsnodeid | Clef publique, balise de la station | | astroport | Lien vers l'API de la station | | g1station | Lien vers la carte PLAYER de la Station | | g1swarm | Lien vers la carte des cartes des Stations de l'essaim | -Afin de propager la carte chaque Stations lors de son raffraichissement de cache demande aux Boostrap de la récupérer +Afin de propager la carte chaque station lors de son raffraichissement de cache + envoi aux Boostrap une requête pour upload (```/ipns/${IPFSNODEID}```) ``` STATION MAP UPSYNC : http://$nodeip:12345/?${GNODEID}=${IPFSNODEID} ``` diff --git a/RUNTIME/PLAYER.refresh.sh b/RUNTIME/PLAYER.refresh.sh index a49cc648..cb4f322c 100755 --- a/RUNTIME/PLAYER.refresh.sh +++ b/RUNTIME/PLAYER.refresh.sh @@ -176,8 +176,12 @@ for PLAYER in ${PLAYERONE[@]}; do echo "LAT=${LAT}; LON=${LON}; UMAPNS=${UMAPNS}" - ## TODATENS ################ - TODATENS=$(${MY_PATH}/../tools/keygen -t ipfs "${TODATE}${UPLANETNAME}${LAT}" "${TODATE}${UPLANETNAME}${LON}") + ## UMAP TODATENS ################ + ${MY_PATH}/../tools/keygen -t ipfs -o ~/.zen/tmp/${MOATS}/todate.ipfskey "${TODATE}${UPLANETNAME}${LAT}" "${TODATE}${UPLANETNAME}${LON}" + ipfs key rm "_todate" 2>/dev/null + TODATENS=$(ipfs key import "_todate" -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/todate.ipfskey) + ipfs key rm "_todate" 2>/dev/null + echo "GPS UMAP LINK UPDATE ${YESTERDATE} : ${myIPFS}${UMAPNS} ${TODATE} : ${myIPFS}/ipns/${TODATENS}" diff --git a/RUNTIME/PLAYER.unplug.sh b/RUNTIME/PLAYER.unplug.sh index c7c5da3e..d75fe782 100755 --- a/RUNTIME/PLAYER.unplug.sh +++ b/RUNTIME/PLAYER.unplug.sh @@ -6,7 +6,7 @@ ################################################################################ MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized -. "$MY_PATH/my.sh" +. "$MY_PATH/../tools/my.sh" ################################################################################ ## UNPLUG A PLAYER FROM ASTROPORT STATION ############################################ @@ -61,7 +61,7 @@ mkdir -p ~/.zen/tmp/${MOATS} [[ ! -z ${SECTORG1PUB} ]] \ && echo "> PAY4SURE ZEN:${ALL} WALLET MOVE" \ - && ${MY_PATH}/PAY4SURE.sh "${HOME}/.zen/game/players/${PLAYER}/secret.dunikey" "${ALL}" "${SECTORG1PUB}" "UNPLUG:${ALL}" + && ${MY_PATH}/../tools/PAY4SURE.sh "${HOME}/.zen/game/players/${PLAYER}/secret.dunikey" "${ALL}" "${SECTORG1PUB}" "UNPLUG:${ALL}" ## REMOVING PLAYER from ASTROPORT ipfs key rm ${PLAYER}; ipfs key rm ${PLAYER}_feed; ipfs key rm ${G1PUB}; @@ -72,7 +72,7 @@ mkdir -p ~/.zen/tmp/${MOATS} ## SEND PLAYER LAST KNOW TW TW=$(ipfs add -Hq ${INDEX} | tail -n 1) -${MY_PATH}/../tools/mailjet.sh "${PLAYER}" "

Hello ${PLAYER},

Your TW is unplugged from Astroport : TW ARCHIVE.
$(cat ~/.zen/game/players/${PLAYER}/secret.june)

May the force be with you.

" "BYE BYE MESSAGE" +${MY_PATH}/../tools/mailjet.sh "${PLAYER}" "

Ciao ${PLAYER},

Your TW is unplugged from Astroport : TW ARCHIVE.
$(cat ~/.zen/game/players/${PLAYER}/secret.june)

May the force be with you.

" "BYE BYE MESSAGE" echo "PLAYER IPNS KEYS UNPLUGED" echo "#######################" diff --git a/RUNTIME/REGION.refresh.sh b/RUNTIME/REGION.refresh.sh index 0ee6c396..e9bed14f 100755 --- a/RUNTIME/REGION.refresh.sh +++ b/RUNTIME/REGION.refresh.sh @@ -68,10 +68,10 @@ for REGION in ${REGIONS[@]}; do # with bigger planetary swam will be closest "IA Station", or it could be choosen according to ZEN value... STRAPS=($(cat ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | grep -Ev "#" | rev | cut -d '/' -f 1 | rev | grep -v '^[[:space:]]*$')) ## ${STRAPS[@]} ACTINGNODE=${STRAPS[0]} ## FIST NODE IN STRAPS - [[ "${ACTINGNODE}" != "${IPFSNODEID}" ]] \ - && echo ">> ACTINGNODE=${ACTINGNODE} is not ME - CONTINUE -" \ - && continue - + if [[ "${ACTINGNODE}" != "${IPFSNODEID}" ]]; then + echo ">> ACTINGNODE=${ACTINGNODE} is not ME - CONTINUE -" + continue + fi ############################################################## REGIONG1PUB=$(${MY_PATH}/../tools/keygen -t duniter "${UPLANETNAME}${REGION}" "${UPLANETNAME}${REGION}") [[ ! ${REGIONG1PUB} ]] && echo "ERROR generating REGION WALLET" && exit 1 @@ -109,6 +109,10 @@ for REGION in ${REGIONS[@]}; do done NL=${#RSSNODE[@]} + echo " + --- + " >> ~/.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)) for RSS in ${RSSWARM[@]}; do @@ -144,15 +148,15 @@ for REGION in ${REGIONS[@]}; do # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> echo "Numbers of REGION WEEK RSS : ${NL} + ${NS} : "${TOTL} - rm ~/.zen/tmp/${MOATS}/${REGION}/TODO rm ~/.zen/tmp/${MOATS}/${REGION}/N_* echo ${TOTL} > ~/.zen/tmp/${MOATS}/${REGION}/N_${TOTL} RWEEKCID=$(ipfs add -q ~/.zen/tmp/${MOATS}/${REGION}/JOURNAL 2>/dev/null) if [[ ${RWEEKCID} ]]; then - echo "" \ - > ~/.zen/tmp/${MOATS}/${REGION}/Journal._${REGLAT}_${REGLON}.redir.html + echo "" \ + > ~/.zen/tmp/${MOATS}/${REGION}/Journal._${REGLAT}_${REGLON}.view.html + cp ~/.zen/tmp/${MOATS}/${REGION}/JOURNAL \ ~/.zen/tmp/${IPFSNODEID}/UPLANET/REGIONS/_${REGLAT}_${REGLON}/JOURNAL.md fi diff --git a/RUNTIME/RSS2UPlanetSECTORTW.sh b/RUNTIME/RSS2UPlanetSECTORTW.sh index f17107bc..3feac280 100755 --- a/RUNTIME/RSS2UPlanetSECTORTW.sh +++ b/RUNTIME/RSS2UPlanetSECTORTW.sh @@ -39,6 +39,8 @@ ${RSS} cat "${RSS}" | jq 'sort_by(.created) | reverse | .[]' | jq -r '.title' > ~/.zen/tmp/${MOATS}/${SECTOR}/tiddlers.list ## gloops=0 +signatures=0 + while read title; do [[ ${floop} -gt 2 ]] && echo "0lder Tiddlers are similaR... BREAK" && break @@ -54,7 +56,12 @@ while read title; do [[ ! "${ISHERE}" ]] && echo "No Tiddler found in ${INDEX}" - if [[ "${ISHERE}" != "${title}" ]]; then + TMPTAGS=$(cat ~/.zen/tmp/${MOATS}/TMP.json | jq -r .[].tags) + TMPEMAILS=($(echo "$TMPTAGS" | grep -E -o "\b[a-zA-Z0-9.%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b")) + TMPSIGN=${#TMPEMAILS[@]} + echo "INSIDE TIDDLER HAVE ${TMPSIGN} SIGNATURE(S)" + + if [[ "${ISHERE}" != "${title}" || ${TMPSIGN} == 0 ]]; then ## NEW TIDDLER echo "Importing Title: $title" @@ -72,16 +79,17 @@ while read title; do && rm ${INDEX} \ && mv ~/.zen/tmp/${MOATS}/${SECTOR}/${SECTOR}.html ${INDEX} \ && ((gloops++)) \ - && echo "SECTOR (${gloops}) : ${title}" + && echo "SECTOR (${gloops}) : ${title}" \ + && signatures=$((signatures + TMPSIGN)) [[ ! -s ${INDEX} ]] && echo "ERROR. TW did not ingest ~/.zen/tmp/${MOATS}/NEW.json" && exit 1 else ## SAME TIDDLER - echo "TIDDLER WITH TITLE $title ALREADY EXISTS..." + echo "TIDDLER WITH TITLE $title and more than 1 signature ALREADY EXISTS..." - cp -f ~/.zen/tmp/${MOATS}/TMP.json ~/.zen/tmp/${MOATS}/INSIDE.json + cat ~/.zen/tmp/${MOATS}/TMP.json | jq .[] > ~/.zen/tmp/${MOATS}/INSIDE.json cat "${RSS}" | jq -rc ".[] | select(.title == \"$title\")" > ~/.zen/tmp/${MOATS}/NEW.json if [[ ! $(diff ~/.zen/tmp/${MOATS}/NEW.json ~/.zen/tmp/${MOATS}/INSIDE.json) ]]; then @@ -90,9 +98,15 @@ while read title; do continue fi floop=1 - + echo + echo "=========== INSIDE.json" + cat ~/.zen/tmp/${MOATS}/INSIDE.json | jq -c + echo + echo "=========== NEW.json" + cat ~/.zen/tmp/${MOATS}/NEW.json | jq -c + echo ## TODO EXTEND CONTROL TO text & ipfs & _canonical_url -## NEED SIGNATURES & TIDDLER SIMILARITY TO COME UP + ## NEED SIGNATURES & TIDDLER SIMILARITY TO COME UP ## CHECK FOR EMAIL SIGNATURES DIFFERENCE NTAGS=$(cat ~/.zen/tmp/${MOATS}/NEW.json | jq -r .tags) @@ -128,7 +142,7 @@ while read title; do # Print the results echo "Common email addresses : ${COMMON[*]}" echo "Email addresses unique in NEW Tiddler : ${NUNIQUE[*]}" - echo "Email addresses unique in ACTUAL Tiddler : ${IUNIQUE[*]}" + echo "Email addresses unique in INSIDE Tiddler : ${IUNIQUE[*]}" combined=("${IEMAILS[@]}" "${NEMAILS[@]}") unique_combined=($(echo "${combined[@]}" | tr ' ' '\n' | sort -u)) @@ -168,7 +182,7 @@ To Refuse

Actual TiddlerEngage discussion about it...

" > ~/.zen/tmp/${MOATS}/g1message - ${MY_PATH}/mailjet.sh "$email" ~/.zen/tmp/${MOATS}/g1message "TIDDLER COLLISION" + ${MY_PATH}/../tools/mailjet.sh "$email" ~/.zen/tmp/${MOATS}/g1message "TIDDLER COLLISION" done @@ -201,6 +215,8 @@ To Refuse
&& rm ${INDEX} \ && mv ~/.zen/tmp/${MOATS}/${SECTOR}.html ${INDEX} + signatures=$((signatures + ISIGN)) + fi fi @@ -213,11 +229,11 @@ To Refuse
done < ~/.zen/tmp/${MOATS}/${SECTOR}/tiddlers.list #################################################### -################################################ +################################################ ${signatures} -gt ${gloops} ## SECTOR SENDS GRATITUDE TO PUBLISHING PLAYER ################################################### -if [[ ${gloops} -gt 0 && ${ASTROG1} ]]; then +if [[ ${gloops} -gt 0 && ${signatures} -gt ${gloops} && ${ASTROG1} ]]; then # GENERATE SECTOR PRIVATE KEY ################################ ${MY_PATH}/../tools/keygen -t duniter -o ~/.zen/tmp/${MOATS}/sector.dunikey "${UPLANETNAME}${SECTOR}" "${UPLANETNAME}${SECTOR}" G1SECTOR=$(cat ~/.zen/tmp/${MOATS}/sector.dunikey | grep 'pub:' | cut -d ' ' -f 2) diff --git a/RUNTIME/SECTOR.refresh.sh b/RUNTIME/SECTOR.refresh.sh index b790594e..502f2b03 100755 --- a/RUNTIME/SECTOR.refresh.sh +++ b/RUNTIME/SECTOR.refresh.sh @@ -29,8 +29,13 @@ for i in $*; do UMAPS=("$i" ${UMAPS[@]}) done -[[ ${#UMAPS[@]} == 0 ]] && UMAPS="_0.00_0.00" - +## NO $i PARAMETERS - GET ALL UMAPS +if [[ ${#UMAPS[@]} == 0 ]]; then + MEMAPS=($(ls -td ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/* 2>/dev/null | rev | cut -d '/' -f 1 | rev | sort | uniq)) + SWARMMAPS=($(ls -Gd ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/* 2>/dev/null | rev | cut -d '/' -f 1 | rev | sort | uniq)) + combined=("${MEMAPS[@]}" "${SWARMMAPS[@]}") + UMAPS=($(echo "${combined[@]}" | tr ' ' '\n' | sort -u)) +fi ######## INIT SECTORS ######################## for UMAP in ${UMAPS[@]}; do @@ -62,47 +67,58 @@ for SECTOR in ${SECTORS[@]}; do SLON=$(echo ${SECTOR} | cut -d '_' -f 3) ############################################################## - G1PUB=$(${MY_PATH}/../tools/keygen -t duniter "${UPLANETNAME}${SECTOR}" "${UPLANETNAME}${SECTOR}") + ${MY_PATH}/../tools/keygen -t duniter -o ~/.zen/tmp/${MOATS}/${SECTOR}.dunikey "${UPLANETNAME}${SECTOR}" "${UPLANETNAME}${SECTOR}" + G1PUB=$(cat ~/.zen/tmp/${MOATS}/${SECTOR}.dunikey | grep 'pub:' | cut -d ' ' -f 2) [[ ! ${G1PUB} ]] && echo "ERROR generating SECTOR WALLET" && exit 1 + COINS=$($MY_PATH/../tools/COINScheck.sh ${G1PUB} | tail -n 1) - echo "SECTOR : ${SECTOR} (${COINS} G1) WALLET : ${G1PUB}" ZEN=$(echo "($COINS - 1) * 10" | bc | cut -d '.' -f 1) - ${MY_PATH}/../tools/keygen -t ipfs -o ~/.zen/tmp/${MOATS}/${SECTOR}.priv "${UPLANETNAME}${SECTOR}" "${UPLANETNAME}${SECTOR}" ipfs key rm ${G1PUB} > /dev/null 2>&1 ## AVOID ERROR ON IMPORT SECTORNS=$(ipfs key import ${G1PUB} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/${SECTOR}.priv) - rm ~/.zen/tmp/${MOATS}/${SECTOR}.priv - echo "ORIGIN : ${myIPFS}/ipns/${SECTORNS}/" + echo "___ ORIGIN ___ ${myIPFS}/ipns/${SECTORNS}/" + echo "SECTOR : ${SECTOR} (${COINS} G1 <=> ${ZEN} ZEN) : ${G1PUB}" - ###################### SPATIO TEMPORAL KEYS - ## YESTERDATE ############### - ${MY_PATH}/../tools/keygen -t ipfs -o ~/.zen/tmp/${MOATS}/${YESTERDATE}.priv "${YESTERDATE}${UPLANETNAME}${SECTOR}" "${YESTERDATE}${UPLANETNAME}${SECTOR}" - ipfs key rm ${YESTERDATE}${G1PUB} > /dev/null 2>&1 - YESTERDATENS=$(ipfs key import ${YESTERDATE}${G1PUB} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/${YESTERDATE}.priv) - echo "YESTERDAY : ${myIPFS}/ipns/${YESTERDATENS}" + ###################### SPATIO TEMPORAL KEYS + ## YESTERDATE ############### + ${MY_PATH}/../tools/keygen -t ipfs -o ~/.zen/tmp/${MOATS}/${YESTERDATE}.priv "${YESTERDATE}${UPLANETNAME}${SECTOR}" "${YESTERDATE}${UPLANETNAME}${SECTOR}" + ipfs key rm ${YESTERDATE}${G1PUB} > /dev/null 2>&1 + YESTERDATENS=$(ipfs key import ${YESTERDATE}${G1PUB} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/${YESTERDATE}.priv) + echo "YESTERDAY : ${myIPFS}/ipns/${YESTERDATENS}" - ## TODATE ######################################### - ${MY_PATH}/../tools/keygen -t ipfs -o ~/.zen/tmp/${MOATS}/${TODATE}.priv "${TODATE}${UPLANETNAME}${SECTOR}" "${TODATE}${UPLANETNAME}${SECTOR}" - ipfs key rm ${TODATE}${G1PUB} > /dev/null 2>&1 - TODATENS=$(ipfs key import ${TODATE}${G1PUB} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/${TODATE}.priv) - echo "TODAY : ${myIPFS}/ipns/${TODATENS}" + ## TODATE ######################################### + ${MY_PATH}/../tools/keygen -t ipfs -o ~/.zen/tmp/${MOATS}/${TODATE}.priv "${TODATE}${UPLANETNAME}${SECTOR}" "${TODATE}${UPLANETNAME}${SECTOR}" + ipfs key rm ${TODATE}${G1PUB} > /dev/null 2>&1 + TODATENS=$(ipfs key import ${TODATE}${G1PUB} -f pem-pkcs8-cleartext ~/.zen/tmp/${MOATS}/${TODATE}.priv) + echo "TODAY : ${myIPFS}/ipns/${TODATENS}" # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - start=`date +%s` + start=`date +%s` # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #~ ## IPFS GET ONLINE YESTERDATE SECTORNS ipfs --timeout 240s get -o ~/.zen/tmp/${MOATS}/${SECTOR}/ /ipns/${YESTERDATENS}/ + if [[ $? != 0 ]]; then + echo "(╥☁╥ ) swarm memory empty (╥☁╥ )" + # Try retieve memory from UPlanet Zen Memory + [[ ${ZEN} -gt 0 ]] \ + && echo "INTERCOM Refreshing from ZEN MEMORY" \ + && ${MY_PATH}/../RUNTIME/ZEN.SECTOR.memory.sh "${SECTOR}" "${MOATS}" + fi # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - end=`date +%s` - echo "_____SECTOR${SECTOR} GET time was "`expr $end - $start` seconds. + end=`date +%s` + echo "_____SECTOR${SECTOR} GET time was "`expr $end - $start` seconds. # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + ### ZEN + + ## CONTROL CHAIN TIME ZCHAIN=$(cat ~/.zen/tmp/${MOATS}/${SECTOR}/CHAIN/_chain | rev | cut -d ':' -f 1 | rev 2>/dev/null) ZMOATS=$(cat ~/.zen/tmp/${MOATS}/${SECTOR}/CHAIN/_moats 2>/dev/null) [[ ${ZCHAIN} && ${ZMOATS} ]] \ && cp ~/.zen/tmp/${MOATS}/${SECTOR}/CHAIN/_chain ~/.zen/tmp/${MOATS}/${SECTOR}/CHAIN/_chain.${ZMOATS} \ - && echo "UPDATING MOATS" + && echo "UPDATING MOATS ${MOATS}" MOATS_SECONDS=$(${MY_PATH}/../tools/MOATS2seconds.sh ${MOATS}) ZMOATS_SECONDS=$(${MY_PATH}/../tools/MOATS2seconds.sh ${ZMOATS}) @@ -113,7 +129,7 @@ for SECTOR in ${SECTORS[@]}; do echo "SECTOR DATA is ${hours} hours ${minutes} minutes ${seconds} seconds OLD" # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - ## CONTROL ACTINGNODE SWAPPING + ## CONTROL ACTINGNODE : BOOSTRAP DISTRIBUTED (jeu du mouchoir, token ring aléatoire) UREFRESH="${HOME}/.zen/tmp/${MOATS}/${SECTOR}/CHAIN/SECTOR.refresher" ALLNODES=($(cat ${UREFRESH} | grep -v '^[[:space:]]*$' 2>/dev/null)) # ${ALLNODES[@]} without empty line STRAPS=($(cat ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | grep -Ev "#" | rev | cut -d '/' -f 1 | rev | grep -v '^[[:space:]]*$')) ## ${STRAPS[@]} @@ -135,14 +151,18 @@ for SECTOR in ${SECTORS[@]}; do && echo "More than 26H update" \ && ACTINGNODE=${STRAPS[0]} - [[ "${ACTINGNODE}" != "${IPFSNODEID}" ]] \ - && echo ">> ACTINGNODE=${ACTINGNODE} is not ME - CONTINUE -" \ - && ipfs key rm ${TODATE}${G1PUB} ${YESYERDATE}${G1PUB} ${G1PUB}; continue + echo "* ACTINGNODE=${ACTINGNODE}" + if [[ "${ACTINGNODE}" != "${IPFSNODEID}" ]]; then + echo ">> ACTINGNODE NOT ME - CONTINUE -" + ipfs key rm "${TODATE}${G1PUB}" "${YESYERDATE}${G1PUB}" "${G1PUB}" + echo "------8<-------------8<------------------8<-----------------8<-----------------8<" + continue + fi ### NEXT REFRESHER SHUFFLE rm ${UREFRESH} for STRAP in ${STRAPS[@]}; do - echo ${STRAP} >> ${UREFRESH} ## RESET SECTOR.refresher file with actual STRAPS + echo ${STRAP} >> ${UREFRESH} ## RESET SECTOR.refresher file with actual STRAPS done # SHUFFLE UMAP.refresher cat ${UREFRESH} | sort | uniq | shuf > ${UREFRESH}.shuf @@ -203,118 +223,126 @@ for SECTOR in ${SECTORS[@]}; do ## MAKE SECTOR PLANET WITH ASTONAUTENS LINKS ########################################################################################### ########################################################################################### - ## PREPARE Ŋ1 WORLD MAP ################################################################## - echo "var examples = {}; - examples['locations'] = function() { - var locations = { - " > ~/.zen/tmp/world.js - floop=1 + ## PREPARE Ŋ1 WORLD MAP ################################################################## + echo "var examples = {}; + examples['locations'] = function() { + var locations = { + " > ~/.zen/tmp/world.js + floop=1 - SWARMTW=($(ls ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_${SLAT}*_${SLON}*/TW/*/index.html 2>/dev/null)) - NODETW=($(ls ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_${SLAT}*_${SLON}*/TW/*/index.html 2>/dev/null)) - TWFILES=("${SWARMTW[@]}" "${NODETW[@]}") + SWARMTW=($(ls ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_${SLAT}*_${SLON}*/TW/*/index.html 2>/dev/null)) + NODETW=($(ls ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_${SLAT}*_${SLON}*/TW/*/index.html 2>/dev/null)) + TWFILES=("${SWARMTW[@]}" "${NODETW[@]}") - for TWRED in ${TWFILES[@]}; do - ZMAIL=$(echo ${TWRED} | rev | cut -d '/' -f 2 | rev) - TWADD=$(cat ${TWRED} | grep -o "/ipns/[^\"]*" | sed "s/'$//") - [[ -z ${TWADD} ]] && TWADD=$(cat ${TWRED} | grep -o "/ipfs/[^\"]*" | sed "s/'$//") + for TWRED in ${TWFILES[@]}; do + ZMAIL=$(echo ${TWRED} | rev | cut -d '/' -f 2 | rev) + TWADD=$(cat ${TWRED} | grep -o "/ipns/[^\"]*" | sed "s/'$//") + [[ -z ${TWADD} ]] && TWADD=$(cat ${TWRED} | grep -o "/ipfs/[^\"]*" | sed "s/'$//") - ## ADD ASTRONAUTNS ON SECTOR WORLD MAP - echo "${floop}: { - alpha: Math.random() * 2 * Math.PI, - delta: Math.random() * 2 * Math.PI, - name: '"${ZMAIL}"', - link: '"${TWADD}"' - } - ," >> ~/.zen/tmp/world.js + ## ADD ASTRONAUTNS ON SECTOR WORLD MAP + echo "${floop}: { + alpha: Math.random() * 2 * Math.PI, + delta: Math.random() * 2 * Math.PI, + name: '"${ZMAIL}"', + link: '"${TWADD}"' + } + ," >> ~/.zen/tmp/world.js - ((floop++)) - done + ((floop++)) + done - # REMOVE la dernière virgule - sed -i '$ d' ~/.zen/tmp/world.js - ################################## - ## FINISH LOCATIONS - echo " - }; - \$('#sphere').earth3d({ - locationsElement: \$('#locations'), - dragElement: \$('#locations'), - locations: locations - }); - }; - " >> ~/.zen/tmp/world.js + # REMOVE la dernière virgule + sed -i '$ d' ~/.zen/tmp/world.js + ################################## + ## FINISH LOCATIONS + echo " + }; + \$('#sphere').earth3d({ + locationsElement: \$('#locations'), + dragElement: \$('#locations'), + locations: locations + }); + }; + " >> ~/.zen/tmp/world.js - IAMAP=$(ipfs add -qw ~/.zen/tmp/world.js | tail -n 1) - echo "JSON WISH WORLD READY /ipfs/${IAMAP}/world.js" + IAMAP=$(ipfs add -qw ~/.zen/tmp/world.js | tail -n 1) + echo "JSON WISH WORLD READY /ipfs/${IAMAP}/world.js" - ########################################################################################### - ## ADD SECTOR ZENPUB.png & INFO.png - convert -font 'Liberation-Sans' \ - -pointsize 80 -fill purple -draw 'text 50,120 "'"${ZEN} Zen"'"' \ - -pointsize 30 -fill purple -draw 'text 40, 180 "'"${SECTOR}"'"' \ - $MY_PATH/../images/G1WorldMap.png "${HOME}/.zen/tmp/${MOATS}/${SECTOR}.png" - # CREATE G1PUB AMZQR - amzqr ${G1PUB} -l H -p "$MY_PATH/../images/zenticket.png" -c -n ZENPUB.png -d ~/.zen/tmp/${MOATS}/${SECTOR}/ - convert ~/.zen/tmp/${MOATS}/${SECTOR}/ZENPUB.png -resize 250 ~/.zen/tmp/${MOATS}/ZENPUB.png - # ADD IT - composite -compose Over -gravity NorthEast -geometry +0+0 ~/.zen/tmp/${MOATS}/ZENPUB.png ~/.zen/tmp/${MOATS}/${SECTOR}.png ~/.zen/tmp/${MOATS}/${SECTOR}/INFO.png + ########################################################################################### + ## ADD SECTOR ZENPUB.png & INFO.png + convert -font 'Liberation-Sans' \ + -pointsize 80 -fill purple -draw 'text 50,120 "'"${ZEN} Zen"'"' \ + -pointsize 30 -fill purple -draw 'text 40, 180 "'"${SECTOR}"'"' \ + $MY_PATH/../images/G1WorldMap.png "${HOME}/.zen/tmp/${MOATS}/${SECTOR}.png" + # CREATE G1PUB AMZQR + amzqr ${G1PUB} -l H -p "$MY_PATH/../images/zenticket.png" -c -n ZENPUB.png -d ~/.zen/tmp/${MOATS}/${SECTOR}/ + convert ~/.zen/tmp/${MOATS}/${SECTOR}/ZENPUB.png -resize 250 ~/.zen/tmp/${MOATS}/ZENPUB.png + # ADD IT + composite -compose Over -gravity NorthEast -geometry +0+0 ~/.zen/tmp/${MOATS}/ZENPUB.png ~/.zen/tmp/${MOATS}/${SECTOR}.png ~/.zen/tmp/${MOATS}/${SECTOR}/INFO.png - ## zday marking - rm ~/.zen/tmp/${MOATS}/${SECTOR}/z* 2>/dev/null - echo "${TODATE} ${SECTOR}" > ~/.zen/tmp/${MOATS}/${SECTOR}/z$(date +%A-%d_%m_%Y).html + ## zday marking + rm ~/.zen/tmp/${MOATS}/${SECTOR}/z* 2>/dev/null + echo "${TODATE} ${SECTOR}" > ~/.zen/tmp/${MOATS}/${SECTOR}/z$(date +%A-%d_%m_%Y).html - ########################################################################################### - ### APPLY ON APP MODEL TODATE REGIONNS LINKING - REGLAT=$(echo ${SLAT} | cut -d '.' -f 1) - REGLON=$(echo ${SLON} | cut -d '.' -f 1) - REGION="_${REGLAT}_${REGLON}" - TODATEREGIONNS=$(${MY_PATH}/../tools/keygen -t ipfs "${TODATE}${UPLANETNAME}${REGION}" "${TODATE}${UPLANETNAME}${REGION}") + ########################################################################################### + ### APPLY ON APP MODEL TODATE REGIONNS LINKING + REGLAT=$(echo ${SLAT} | cut -d '.' -f 1) + REGLON=$(echo ${SLON} | cut -d '.' -f 1) + REGION="_${REGLAT}_${REGLON}" + 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}") - PHONEBOOTH="${G1PUB::30}" - cat ${MY_PATH}/../templates/UPlanetSector/index.html \ - | sed -e "s~_ZONE_~SECTOR ${SECTOR}~g" \ - -e "s~_UPZONE_~REGION ${REGION}~g" \ - -e "s~QmYdWBx32dP14XcbXF7hhtDq7Uu6jFmDaRnuL5t7ARPYkW/index_fichiers/world.js~${IAMAP}/world.js~g" \ - -e "s~_ZONENS_~${TODATENS}~g" \ - -e "s~_ZONEIPFS_~${ZCHAIN}~g" \ - -e "s~_UPZONENS_~${TODATEREGIONNS}~g" \ - -e "s~_SECTORG1PUB_~${G1PUB}~g" \ - -e "s~_IPFSNINJA_~${VDONINJA}~g" \ - -e "s~_CESIUMIPFS_~${CESIUMIPFS}~g" \ + PHONEBOOTH="${G1PUB::30}" + cat ${MY_PATH}/../templates/UPlanetSector/index.html \ + | sed -e "s~_ZONE_~SECTOR ${SECTOR}~g" \ + -e "s~_UPZONE_~REGION ${REGION}~g" \ + -e "s~QmYdWBx32dP14XcbXF7hhtDq7Uu6jFmDaRnuL5t7ARPYkW/index_fichiers/world.js~${IAMAP}/world.js~g" \ + -e "s~_ZONENS_~${TODATENS}~g" \ + -e "s~_ZCHAIN_~${ZCHAIN}~g" \ + -e "s~_UPZONENS_~${TODATEREGIONNS}~g" \ + -e "s~_SECTORG1PUB_~${G1PUB}~g" \ + -e "s~_IPFSNINJA_~${VDONINJA}~g" \ + -e "s~_CESIUMIPFS_~${CESIUMIPFS}~g" \ -e "s~_HACKGIPFS_~${HACKGIPFS}~g" \ - -e "s~_PHONEBOOTH_~${PHONEBOOTH}~g" \ - -e "s~_LAT_~${LAT::-1}~g" \ - -e "s~_LON_~${LON::-1}~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~http://127.0.0.1:8080~~g" \ - > ~/.zen/tmp/${MOATS}/${SECTOR}/_index.html + -e "s~_PHONEBOOTH_~${PHONEBOOTH}~g" \ + -e "s~_LAT_~${SLAT}~g" \ + -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~http://127.0.0.1:8080~~g" \ + > ~/.zen/tmp/${MOATS}/${SECTOR}/_index.html - ################################## - cp -f ~/.zen/tmp/${MOATS}/${SECTOR}/_index.html ~/.zen/tmp/${MOATS}/${SECTOR}/index.html - rm ~/.zen/tmp/${MOATS}/${SECTOR}/index.html ## MAKE SECTOR VISIBLE ## + ################################## + cp -f ~/.zen/tmp/${MOATS}/${SECTOR}/_index.html ~/.zen/tmp/${MOATS}/${SECTOR}/index.html + rm ~/.zen/tmp/${MOATS}/${SECTOR}/index.html ## MAKE SECTOR VISIBLE ## ###################################################### CHAINING BACKUP IPFSPOP=$(ipfs add -rwq ~/.zen/tmp/${MOATS}/${SECTOR}/* | tail -n 1) - - ## DOES CHAIN CHANGED or INIT ? [[ ${ZCHAIN} != ${IPFSPOP} || ${ZCHAIN} == "" ]] \ && echo "${MOATS}:${IPFSNODEID}:${IPFSPOP}" > ~/.zen/tmp/${MOATS}/${SECTOR}/CHAIN/_chain \ && echo "${MOATS}" > ~/.zen/tmp/${MOATS}/${SECTOR}/CHAIN/_moats \ && IPFSPOP=$(ipfs add -rwq ~/.zen/tmp/${MOATS}/${SECTOR}/* | tail -n 1) && echo "ROOT was ${ZCHAIN}" ###################################################### - - echo "% START PUBLISHING ${SECTOR} ${myIPFS}/ipns/${TODATENS}" - start=`date +%s` - ipfs name publish -k ${TODATE}${G1PUB} /ipfs/${IPFSPOP} - ipfs key rm ${YESTERDATE}${G1PUB} ${G1PUB} > /dev/null 2>&1 - end=`date +%s` - echo "_____SECTOR${SECTOR} PUBLISH time was "`expr $end - $start` seconds. + ## ZEN CHAINING + # Send 1 Zen to UPlanet REGIONG1PUB Wallet containing REGION TW HASH + INTERCOM="UPLANET:${SECTOR}:${TODATE}:/ipfs/${IPFSPOP}" + echo "> INTERCOM ${INTERCOM} (${ZEN} ZEN)" + if [[ ${ZEN} -gt 11 ]]; then + echo "---ZZZ-- SECTOR 2 REGION ZEN CHAINING ---ZZZ------ZZZ----" + ${MY_PATH}/../tools/PAY4SURE.sh ~/.zen/tmp/${MOATS}/${SECTOR}.dunikey "0.1" "${REGIONG1PUB}" "${INTERCOM}" + fi + ############################################################## + ## PUBLISHING ${SECTOR} + ############################### + echo "% PUBLISHING ${SECTOR} ${myIPFS}/ipns/${TODATENS}" + start=`date +%s` + ipfs name publish -k ${TODATE}${G1PUB} /ipfs/${IPFSPOP} + ipfs key rm ${YESTERDATE}${G1PUB} ${G1PUB} > /dev/null 2>&1 ###################################################### + rm ~/.zen/tmp/${MOATS}/${SECTOR}.dunikey ################################################### ## EXTRACT SECTOR LAST WEEK TIDDLERS TO IPFSNODEID CACHE @@ -333,6 +361,8 @@ for SECTOR in ${SECTORS[@]}; do ## 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 + end=`date +%s` + echo "_____SECTOR${SECTOR} TREATMENT time was "`expr $end - $start` seconds. done diff --git a/RUNTIME/UPLANET.refresh.sh b/RUNTIME/UPLANET.refresh.sh index 2841a625..a4fc9354 100755 --- a/RUNTIME/UPLANET.refresh.sh +++ b/RUNTIME/UPLANET.refresh.sh @@ -11,10 +11,18 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized ## SEEK FOR UPLANET KEYS # GET & UPDATE IPNS ############################################ -echo -echo echo "############################################" -echo "## RUNNING UPLANET.refresh" +echo " + _________________________ +< RUNNING UPLANET.refresh > + ------------------------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || + +" echo "############################################" echo "############################################" [[ ${IPFSNODEID} == "" ]] && echo "IPFSNODEID is empty - EXIT -" && exit 1 @@ -34,9 +42,13 @@ combined=("${MEMAPS[@]}" "${SWARMMAPS[@]}") unique_combined=($(echo "${combined[@]}" | tr ' ' '\n' | sort -u)) echo "ACTIVATED UMAPS : ${unique_combined[@]}" # "_LAT_LON" directories +###################################################### +### LEVEL 1 ########################################### +###################################################### for UMAP in ${unique_combined[@]}; do start=`date +%s` + echo echo "____________REFRESHING ${UMAP}__________" LAT=$(echo ${UMAP} | cut -d '_' -f 2) LON=$(echo ${UMAP} | cut -d '_' -f 3) @@ -54,10 +66,14 @@ for UMAP in ${unique_combined[@]}; do ############################################################## ## UMAP WALLET CHECK ############################################################## - G1PUB=$(${MY_PATH}/../tools/keygen -t duniter "${UPLANETNAME}${LAT}" "${UPLANETNAME}${LON}") - [[ ! ${G1PUB} ]] && echo "ERROR generating WALLET" && exit 1 + ${MY_PATH}/../tools/keygen -t duniter -o ~/.zen/tmp/${MOATS}/${UMAP}.dunikey "${UPLANETNAME}${LAT}" "${UPLANETNAME}${LON}" + G1PUB=$(cat ~/.zen/tmp/${MOATS}/${UMAP}.dunikey | grep 'pub:' | cut -d ' ' -f 2) + [[ ! ${G1PUB} ]] && echo "ERROR generating UMAP WALLET" && exit 1 + COINS=$($MY_PATH/../tools/COINScheck.sh ${G1PUB} | tail -n 1) - echo "UMAP (${COINS} G1) WALLET : ${G1PUB}" + ZEN=$(echo "($COINS - 1) * 10" | bc | cut -d '.' -f 1) + + echo "UMAP (${COINS} G1) ${ZEN} ZEN : ${G1PUB}" ## ORIGIN ########################################################## ## CALCULATE INITIAL UMAP GEOSPACIAL IPNS KEY @@ -84,6 +100,13 @@ for UMAP in ${unique_combined[@]}; do echo "## IPFS GET YESTERDATENS" mkdir ~/.zen/tmp/${MOATS}/${UMAP} ipfs --timeout 240s get -o ~/.zen/tmp/${MOATS}/${UMAP}/ /ipns/${YESTERDATENS}/ + if [[ $? != 0 ]]; then + echo "(╥☁╥ ) swarm memory empty (╥☁╥ )" + # Try retieve memory from UPlanet Zen Memory + [[ ${ZEN} -gt 0 ]] \ + && echo "INTERCOM Refreshing from ZEN MEMORY" \ + && ${MY_PATH}/../RUNTIME/ZEN.UMAP.memory.sh "${UMAP}" "${MOATS}" + fi # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @@ -143,8 +166,9 @@ for UMAP in ${unique_combined[@]}; do echo "* ACTINGNODE=${ACTINGNODE}" if [[ "${ACTINGNODE}" != "${IPFSNODEID}" ]]; then - echo ">> ACTINGNODE=${ACTINGNODE} is not ME - CONTINUE -" + echo ">> ACTINGNODE NOT ME - CONTINUE -" ipfs key rm "${TODATE}${G1PUB}" "${YESTERDATE}${G1PUB}" "${G1PUB}" + echo "------8<-------------8<------------------8<-----------------8<-----------------8<" continue fi ######################################## @@ -208,7 +232,8 @@ for UMAP in ${unique_combined[@]}; do # %%%%%%%%%% ################################################## ## COLLECT RSS FROM ALL PLAYERS WITH SAME UMAP IN SWARM MEMORY /UPLANET/__/_*_*/_*.?_*.?/_*.??_*.?? # %%%%%%%%%% ################################################## - cp ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}_${LON}/RSS/*.rss.json ~/.zen/tmp/${MOATS}/${UMAP}/RSS/ 2>/dev/null + cp ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}_${LON}/RSS/*.rss.json \ + ~/.zen/tmp/${MOATS}/${UMAP}/RSS/ 2>/dev/null RSSFILES=($(ls ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}_${LON}/RSS/*.rss.json 2>/dev/null)) for RSSFILE in ${RSSFILES[@]}; do cp ${RSSFILE} ~/.zen/tmp/${MOATS}/${UMAP}/RSS/ @@ -217,7 +242,8 @@ for UMAP in ${unique_combined[@]}; do # %%%%%%%%%% ################################################## ## COLLECT TW LINKS FROM NODE & SWARM # %%%%%%%%%% ################################################## - cp -r ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}_${LON}/TW/* ~/.zen/tmp/${MOATS}/${UMAP}/TW/ 2>/dev/null + cp -r ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${LAT}_${LON}/TW/* \ + ~/.zen/tmp/${MOATS}/${UMAP}/TW/ 2>/dev/null TWFILES=($(ls ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${LAT}_${LON}/TW/*/index.html 2>/dev/null)) for TWRED in ${TWFILES[@]}; do ZMAIL=$(echo ${TWRED} | rev | cut -d '/' -f 2 | rev) @@ -266,7 +292,7 @@ for UMAP in ${unique_combined[@]}; do echo "* park4night : https://www.park4night.com/api/places/around?lat=${LAT}&lng=${LON}&radius=200&filter=%7B%7D&lang=fr" [[ ! -s ~/.zen/tmp/${MOATS}/${UMAP}/p4n.json ]] && touch ~/.zen/tmp/${MOATS}/${UMAP}/p4n.json [[ ! -s ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json ]] \ - && curl -s "https://www.park4night.com/api/places/around?lat=${LAT}&lng=${LON}&radius=200&filter=%7B%7D&lang=fr" -o ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json \ + && curl -s -L "https://www.park4night.com/api/places/around?lat=${LAT}&lng=${LON}&radius=200&filter=%7B%7D&lang=fr" -o ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json \ && [[ $(stat -c %s ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json) -gt $(stat -c %s ~/.zen/tmp/${MOATS}/${UMAP}/p4n.json) ]] \ && mv ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json ~/.zen/tmp/${MOATS}/${UMAP}/p4n.json \ && echo "UPDATED PARK4NIGHT" \ @@ -277,11 +303,31 @@ for UMAP in ${unique_combined[@]}; do ## GET 100KM GCHANGE ADS ( https://data.gchange.fr ) ${MY_PATH}/../tools/gchange_get_50km_around_LAT_LON_ads.sh ${LAT} ${LON} > ~/.zen/tmp/${MOATS}/${UMAP}/gchange50.json + ## GET ALL WALLETS + echo "* GET WALLETS https://g1-stats.axiom-team.fr/data/geoloc-members.json" + [[ ! -s ~/.zen/tmp/${MOATS}/${UMAP}/wallall.json ]] && touch ~/.zen/tmp/${MOATS}/${UMAP}/wallall.json + [[ ! -s ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json ]] \ + && curl -s "https://g1-stats.axiom-team.fr/data/geoloc-members.json" -o ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json \ + && [[ $(stat -c %s ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json) -gt $(stat -c %s ~/.zen/tmp/${MOATS}/${UMAP}/wallall.json) ]] \ + && mv ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json ~/.zen/tmp/${MOATS}/${UMAP}/wallall.json \ + && echo "UPDATED WALLALL" \ + || rm ~/.zen/tmp/${MOATS}/${UMAP}/fetch.json + + ## FILTER LOCAL WALLETS + target_lat=${LAT} + target_lon=${LON} + precision=0.1 + jq --argjson target_lat "$target_lat" \ + --argjson target_lon "$target_lon" \ + --argjson precision "$precision" \ + '.wallets | map(select((.geoPoint.lat | tonumber) >= ($target_lat - $precision) and (.geoPoint.lat | tonumber) <= ($target_lat + $precision) and (.geoPoint.lon | tonumber) >= ($target_lon - $precision) and (.geoPoint.lon | tonumber) <= ($target_lon + $precision)))' ~/.zen/tmp/${MOATS}/${UMAP}/wallall.json \ + > ~/.zen/tmp/${MOATS}/${UMAP}/wallets.json + echo "MAKING _index.p4n.html with ./templates/P4N/index.html" ## CREATE INDEX LOADING JSONs ON OPENSTREETMAP cat ${MY_PATH}/../templates/P4N/index.html \ - | sed -e "s~43.2218~${LAT}~g" \ - -e "s~1.3977~${LON}~g" \ + | sed -e "s~43.61000~${LAT}~g" \ + -e "s~1.43000~${LON}~g" \ -e "s~_SERVICE_~Commons~g" \ -e "s~_UMAP_~${UMAP}~g" \ -e "s~http://127.0.0.1:8080~~g" \ @@ -345,12 +391,14 @@ for UMAP in ${unique_combined[@]}; do PHONEBOOTH="${G1PUB::30}" cat ${MY_PATH}/../templates/UPlanetUmap/index.html \ | sed -e "s~_ZONE_~UMAP ${UMAP}~g" \ - -e "s~_UPZONE_~SECTOR ${SECTOR}~g" \ -e "s~QmYdWBx32dP14XcbXF7hhtDq7Uu6jFmDaRnuL5t7ARPYkW/index_fichiers/world.js~${IAMAP}/world.js~g" \ -e "s~_ZONENS_~${TODATENS}~g" \ -e "s~_IPFSNINJA_~${VDONINJA}~g" \ -e "s~_HACKGIPFS_~${HACKGIPFS}~g" \ + -e "s~_UPZONE_~SECTOR ${SECTOR}~g" \ -e "s~_UPZONENS_~${TODATESECTORNS}~g" \ + -e "s~_UPUPZONE_~REGION ${REGION}~g" \ + -e "s~_UPUPZONENS_~${TODATEREGIONNS}~g" \ -e "s~_PHONEBOOTH_~${PHONEBOOTH}~g" \ -e "s~_DATE_~$(date +%A-%d_%m_%Y)~g" \ -e "s~_UPLANETLINK_~${EARTHCID}/map_render.html\?southWestLat=${LAT}\&southWestLon=${LON}\°=0.01~g" \ @@ -378,6 +426,16 @@ for UMAP in ${unique_combined[@]}; do && cp ~/.zen/tmp/${MOATS}/${UMAP}/${G1PUB}:ZEN/_chain ~/.zen/tmp/${MOATS}/${UMAP}/${G1PUB}:ZEN/_chain.${ZMOATS} \ && echo "UPDATING MOATS" +###################################################### + ## ZEN CHAINING + # Send 1 Zen to UPlanet SECTORG1PUB Wallet containing REGION TW HASH + INTERCOM="UPLANET:${UMAP}:${TODATE}:/ipfs/${UMAPROOT}" + echo "> INTERCOM ${INTERCOM} (${ZEN} ZEN)" + if [[ ${ZEN} -gt 11 ]]; then + echo "---ZZZ-- UMAP 2 SECTOR ZEN CHAINING ---ZZZ------ZZZ----" + ${MY_PATH}/../tools/PAY4SURE.sh ~/.zen/tmp/${MOATS}/${UMAP}.dunikey "0.1" "${SECTORG1PUB}" "${INTERCOM}" + fi + ## MICRO LEDGER CHAIN CHANGED or INIT ? [[ ${ZCHAIN} != ${UMAPROOT} || ${ZCHAIN} == "" ]] \ && echo "${MOATS}:${IPFSNODEID}:${UMAPROOT}" > ~/.zen/tmp/${MOATS}/${UMAP}/${G1PUB}:ZEN/_chain \ @@ -391,14 +449,24 @@ for UMAP in ${unique_combined[@]}; do echo "(UMAP) ${UMAP} ${TODATE} PUBLISH time was "`expr $end - $start` seconds. ipfs key rm "${TODATE}${G1PUB}" "${YESTERDATE}${G1PUB}" "${G1PUB}" ## REMOVE IPNS KEY + rm ~/.zen/tmp/${MOATS}/*.priv + rm ~/.zen/tmp/${MOATS}/${UMAP}.dunikey done - +###################################################### +### LEVEL 2 ########################################### +###################################################### ### SECTOR = 0.1° Planet Slice ${MY_PATH}/SECTOR.refresh.sh "${unique_combined[@]}" +###################################################### +### LEVEL 3 ########################################### +###################################################### ### REGION = 1° Planet Slice ${MY_PATH}/REGION.refresh.sh "${unique_combined[@]}" +###################################################### - +###################################################### +exit 0 +###################################################### diff --git a/UPlanetKEYS_refresh.sh b/RUNTIME/UPlanetKEYS_refresh.sh similarity index 84% rename from UPlanetKEYS_refresh.sh rename to RUNTIME/UPlanetKEYS_refresh.sh index e3d7d769..0ac3edcd 100755 --- a/UPlanetKEYS_refresh.sh +++ b/RUNTIME/UPlanetKEYS_refresh.sh @@ -8,10 +8,11 @@ MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized ME="${0##*/}" -. "$MY_PATH/tools/my.sh" +. "$MY_PATH/../tools/my.sh" ## LOG into ~/.zen/tmp/_12345.log exec 2>&1 >> ~/.zen/tmp/_12345.log +echo "==========================" echo "(◕‿◕ ) ${ME} (◕‿◕ ) " ## LOCAL @@ -36,28 +37,39 @@ MErunning=$(ps axf --sort=+utime | grep -w ${ME} | grep -v -E 'color=auto|grep' echo "(◕‿◕ ) ${ME} starting UPlanet Terraformation _______________________________" +## COMBINE & SHUFFLE KEYS combined=("${LWKEYS[@]}" "${LSKEYS[@]}" "${LRKEYS[@]}" "${WKEYS[@]}" "${SKEYS[@]}" "${RKEYS[@]}") UKEYS=($(echo "${combined[@]}" | tr ' ' '\n' | sort -u)) echo ${#UKEYS[@]} " JOBS..." -## STORAGE FOR IPFS GET on UPLANET KEYS +## STORAGE FOR IPFS GET UplanetKeyS mkdir -p ~/.zen/tmp/flashmem +## Remove flashmem/UplanetKey older than 3 hours +find ~/.zen/tmp/flashmem -mmin +180 -exec rm -r {} + + floop=0 medo=0 for key in ${UKEYS[@]}; do + [[ -d ~/.zen/tmp/flashmem/$key ]] \ && echo "$key already copied" && medo=$((medo +1)) && continue + floop=$((floop +1)) mkdir -p ~/.zen/tmp/flashmem/$key + echo "ipfs --timeout 180s get -o ~/.zen/tmp/flashmem/$key /ipns/$key" ipfs --timeout 180s get -o ~/.zen/tmp/flashmem/$key /ipns/$key - [[ $? == 0 ]] && medo=$((medo +1)) || rm -Rf ~/.zen/tmp/flashmem/$key + [[ $? == 0 ]] \ + && medo=$((medo +1)) && floop=$((floop -1)) \ + || rm -Rf ~/.zen/tmp/flashmem/$key # GOT IT or NOT ? - floop=$((floop +1)) [ $floop -gt 33 ] && break -done -echo "(◕‿◕ ) ${ME} :: $medo SUCCESS over $floop KEYS from ${#UKEYS[@]} JOBS" +done +echo "==========================" +echo "(◕‿◕ ) ${ME} :: $medo SUCCESS missing $floop KEYS from ${#UKEYS[@]} JOBS" +echo "==========================" + exit 0 diff --git a/RUNTIME/VISA.new.sh b/RUNTIME/VISA.new.sh index eaaa7e22..4b7eea77 100755 --- a/RUNTIME/VISA.new.sh +++ b/RUNTIME/VISA.new.sh @@ -33,7 +33,7 @@ LIBRA=$(head -n 2 ${MY_PATH}/../A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f ################################################################################ ## LIST TW MODELS ################################################################################ -TWMODEL="/ipfs/bafybeie6sx76balvpeehvbh5du7oc5fhjuwydryympeh3qnm5s3b2jrvwe" +TWMODEL="/ipfs/bafybeiewwxkmiojbskcqhbj2gbkde3czkeqftn6fgvwoa7ez5n5whido3q" # ipfs cat $TWMODEL > templates/twdefault.html MINIMAL="/ipfs/bafybeifnlpnvpxxnblgwefoflmdnt2vhckmnu22orsi43zilh2v4sbegjy" # ipfs cat $MINIMAL > templates/twuplanet.html @@ -328,7 +328,7 @@ DISCO="/?salt=${USALT}&pepper=${UPEPPER}" MACHINEPUB=$(cat $HOME/.zen/game/myswarm_secret.dunikey | grep pub | cut -d ' ' -f 2) #~ echo "# CRYPTO ENCODING _SECRET_ " ${MY_PATH}/../tools/natools.py encrypt -p ${MACHINEPUB} -i $HOME/.zen/game/players/${PLAYER}/secret.dunikey -o $HOME/.zen/tmp/${MOATS}/secret.dunikey.$G1PUB.enc - ENCODING=$(cat ~/.zen/tmp/${MOATS}/secret.dunikey.$G1PUB.enc | base16) + ENCODING=$(cat ~/.zen/tmp/${MOATS}/bafybeiewwxkmiojbskcqhbj2gbkde3czkeqftn6fgvwoa7ez5n5whido3qsecret.dunikey.$G1PUB.enc | base16) sed -i "s~${OLD16}~${ENCODING}~g" ~/.zen/game/players/${PLAYER}/ipfs/moa/index.html # IN CASE ORIGINAL STATION NEEDS ACCESS # COULD BE REMOVED ? ########### @@ -558,9 +558,9 @@ do echo "
" >> ~/.zen/tmp/${MOATS}/ZenCard.html done <"$asciiart" -echo "

-ZenCard ${G1PUB}

-
" >> ~/.zen/tmp/${MOATS}/ZenCard.html +echo "

PRINT & SHARE ZenCard

+
+" >> ~/.zen/tmp/${MOATS}/ZenCard.html $MY_PATH/../tools/mailjet.sh "${PLAYER}" ~/.zen/tmp/${MOATS}/ZenCard.html "ZenCard (${PLAYER}) " @@ -590,9 +590,9 @@ do done <"$asciiart" echo " -

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

-
AstroID
-
SECRET1=$SALT SECRET2=$PEPPER ($PASS)
+

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

+
PRINT & KEEP SAFE AstroID
+
SECRET1=$SALT
SECRET2=$PEPPER
($PASS)

ASTROPORT : /ipns/${IPFSNODEID}

Uplanet " >> ~/.zen/tmp/${MOATS}/AstroID.html @@ -610,6 +610,12 @@ $MY_PATH/../tools/mailjet.sh "${PLAYER}" ~/.zen/tmp/${MOATS}/AstroID.html "Astr rm -Rf ~/.zen/tmp/${MOATS} ) & +## CHECK .current +[[ ! -d $(readlink ~/.zen/game/players/.current) ]] \ +&& rm ~/.zen/game/players/.current 2>/dev/null \ +&& ln -s ~/.zen/game/players/${PLAYER} ~/.zen/game/players/.current + + echo $PSEUDO > ~/.zen/tmp/PSEUDO ## Return data to command.sh # KEEP IT echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" ################################################ LAST LINE REPORT VALUES TO CALLING SCRIPT | tail -n 1 diff --git a/RUNTIME/VOEUX.refresh.sh b/RUNTIME/VOEUX.refresh.sh index c7aca3bf..7ef9db3a 100755 --- a/RUNTIME/VOEUX.refresh.sh +++ b/RUNTIME/VOEUX.refresh.sh @@ -54,9 +54,10 @@ echo "Exporting ${PLAYER} TW [tag[G1Voeu]]" rm -f ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json tiddlywiki --load ${INDEX} --output ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu --render '.' "${PLAYER}.g1voeu.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[G1Voeu]]' -[[ ! -s ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json ]] && echo "AUCUN G1VOEU - EXIT -" && exit 0 +[[ ! -s ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json ]] \ + && echo "AUCUN G1VOEU - EXIT -" && exit 0 -cat ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json | jq -r '.[].wish' > ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1wishes.txt +cat ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1voeu.json | jq -r 'map(select(.wish != null)) | .[].wish' > ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1wishes.txt wishnumbers=$(cat ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1wishes.txt | wc -l) echo "${wishnumbers} VOEUX : ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/${PLAYER}.g1wishes.txt " @@ -316,7 +317,7 @@ if [[ ${wishnumbers} -gt 0 ]]; then to ${SECTOR} WALLET ${SECTORG1PUB}" echo "************************************************************" MYWISHFLUX=$(ipfs add -qHwr ~/.zen/tmp/${IPFSNODEID}/WISH/${PLAYER}/g1voeu/* | tail -n 1) # ADDING JSONS TO IPFS - ${MY_PATH}/../tools/PAY4SURE.sh "${HOME}/.zen/game/players/${PLAYER}/secret.dunikey" "${G1AMOUNT}" "${SECTORG1PUB}" "/ipfs/${MYWISHFLUX}" + ${MY_PATH}/../tools/PAY4SURE.sh "${HOME}/.zen/game/players/${PLAYER}/secret.dunikey" "${G1AMOUNT}" "${SECTORG1PUB}" "UPLANET:TWISH:$TODATE:/ipfs/${MYWISHFLUX}" fi ################################################ ################################################ GRATITUDE SENT TO SECTOR diff --git a/RUNTIME/ZEN.SECTOR.memory.sh b/RUNTIME/ZEN.SECTOR.memory.sh new file mode 100755 index 00000000..092a5b3f --- /dev/null +++ b/RUNTIME/ZEN.SECTOR.memory.sh @@ -0,0 +1,96 @@ +################################################################################ +# Author: Fred (support@qo-op.com) +# Version: 0.1 +# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) +################################################################################ +#~ ZEN.SECTOR.memory.sh +#~ Search for last "UPLANET:$1:..." in UPLANETG1PUB wallet history +#~ INTERCOM="UPLANET:${SECTOR}:${TODATE}:/ipfs/${IPFSPOP}" TX COMMENT are made during SECTOR.refresh.sh +#~ ~/.zen/tmp/${MOATS}/${SECTOR} <=> "/ipfs/$ipfs_pop" +################################################################################ +################################################################################ +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +. "${MY_PATH}/../tools/my.sh" +################################################################################ + +SECTOR="$1" +[[ $SECTOR == "" ]] && echo "MISSING SECTOR ADRESS" && exit 1 +MOATS="$2" + +## CHECK FOR BAD PARAM +[[ ! -d ~/.zen/tmp/${MOATS-empty}/${SECTOR-empty}/ ]] \ + && echo "BAD ~/.zen/tmp/${MOATS}/${SECTOR}" \ + && exit 1 + +## STARTING +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) + +REGION="_${REGLAT}_${REGLON}" +${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 +COINS=$($MY_PATH/../tools/COINScheck.sh ${REGIONG1PUB} | tail -n 1) +echo "REGION : ${REGION} (${COINS} G1) WALLET : ${REGIONG1PUB}" + +## RETRIEVE FROM REGION UKEY +${MY_PATH}/timeout.sh -t 20 $MY_PATH/jaklis/jaklis.py history -n 300 -p ${REGIONG1PUB} -j \ + > ~/.zen/tmp/${MOATS}/${REGION}.g1history.json + +## SCAN FOR UPLANET:${SECTOR} in TX +if [[ -s ~/.zen/tmp/${MOATS}/${REGION}.g1history.json ]]; then + + intercom=$(jq -r '.[] | select(.comment | test("UPLANET:'"${SECTOR}"'")) | .comment' ~/.zen/tmp/${MOATS}/${REGION}.g1history.json) + ipfs_pop=$(echo "$intercom" | grep -oP 'UPLANET:'"${SECTOR}"':/ipfs/\K[^"]+') + todate=$(echo "$intercom" | grep -oP 'UPLANET:'"${SECTOR}"':\K[^:]*') + echo "SYNC ~/.zen/tmp/${MOATS}/${SECTOR} <=> /ipfs/$ipfs_pop" + + ## TODO: SECURITY PATCH : check payment emitter is SECTORG1PUB + if [[ $ipfs_pop ]]; then + echo "from $todate memory slot" + ipfs --timeout 90s get -o ~/.zen/tmp/${MOATS}/${SECTOR} /ipfs/$ipfs_pop + else + echo "WARNING cannot remember... scan for more TX ??!" + fi + +else + echo "FATAL ERROR cannot access to REGIONG1PUB history" + exit 1 +fi + +end=`date +%s` +echo "(${SECTOR}.memory) ${todate} get time : "`expr $end - $start` seconds. + +#~ ## EXTRACT WORLDG1PUB HISTORY +#~ ${MY_PATH}/timeout.sh -t 20 $MY_PATH/jaklis/jaklis.py history -n 300 -p ${WORLDG1PUB} -j \ + #~ > ~/.zen/tmp/${MOATS}/${WORLDG1PUB}.g1history.json + +#~ ## SCAN FOR UPLANET:${SECTOR} in TX +#~ if [[ -s ~/.zen/tmp/${MOATS}/${WORLDG1PUB}.g1history.json ]]; then + + #~ intercom=$(jq -r '.[] | select(.comment | test("UPLANET:'"${SECTOR}"'")) | .comment' ~/.zen/tmp/${MOATS}/${WORLDG1PUB}.g1history.json) + #~ ipfs_pop=$(echo "$intercom" | grep -oP 'UPLANET:'"${SECTOR}"':/ipfs/\K[^"]+') + #~ todate=$(echo "$intercom" | grep -oP 'UPLANET:'"${SECTOR}"':\K[^:]*') + #~ echo "SYNC ~/.zen/tmp/${MOATS}/${SECTOR} <=> /ipfs/$ipfs_pop" + + #~ if [[ $ipfs_pop ]]; then + #~ echo "from $todate memory slot" + #~ ipfs --timeout 90s get -o ~/.zen/tmp/${MOATS}/${SECTOR} /ipfs/$ipfs_pop + #~ end=`date +%s` + #~ echo "(${SECTOR}) ${todate} get time : "`expr $end - $start` seconds. + #~ else + #~ echo "WARNING cannot remember... scan for more TX ??!" + #~ fi + +#~ else + #~ echo "FATAL ERROR cannot access to WORLDG1PUB history" + #~ exit 1 +#~ fi + +exit 0 diff --git a/RUNTIME/ZEN.UMAP.memory.sh b/RUNTIME/ZEN.UMAP.memory.sh new file mode 100755 index 00000000..569940cf --- /dev/null +++ b/RUNTIME/ZEN.UMAP.memory.sh @@ -0,0 +1,73 @@ +################################################################################ +# Author: Fred (support@qo-op.com) +# Version: 0.1 +# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) +################################################################################ +#~ ZEN.UMAP.memory.sh +#~ Search for last "UPLANET:$1:..." in UPLANETG1PUB wallet history +#~ INTERCOM="UPLANET:${UMAP}:${TODATE}:/ipfs/${IPFSPOP}" TX COMMENT are made during UPLANET.refresh.sh +#~ ~/.zen/tmp/${MOATS}/${UMAP} <=> "/ipfs/$ipfs_pop" +################################################################################ +################################################################################ +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +. "${MY_PATH}/../tools/my.sh" +################################################################################ + +UMAP="$1" +[[ $UMAP == "" ]] && echo "MISSING UMAP ADRESS" && exit 1 +MOATS="$2" + +## CHECK FOR BAD PARAM +[[ ! -d ~/.zen/tmp/${MOATS-empty}/${UMAP-empty}/ ]] \ + && echo "BAD ~/.zen/tmp/${MOATS}/${UMAP}" \ + && exit 1 + +## STARTING +start=`date +%s` + +## CORRESPONDING SECTOR UKEY +LAT=$(echo ${UMAP} | cut -d '_' -f 2) +LON=$(echo ${UMAP} | cut -d '_' -f 3) + +## SECTOR COORD +SECLAT="${LAT::-1}" +SECLON="${LON::-1}" + +SECTOR="_${SECLAT}_${SECLON}" + +${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) +[[ ! ${SECTORG1PUB} ]] && echo "ERROR generating SECTOR WALLET" && exit 1 +COINS=$($MY_PATH/../tools/COINScheck.sh ${SECTORG1PUB} | tail -n 1) +echo "SECTOR : ${SECTOR} (${COINS} G1) WALLET : ${SECTORG1PUB}" + +## RETRIEVE FROM SECTOR UKEY +${MY_PATH}/timeout.sh -t 20 $MY_PATH/jaklis/jaklis.py history -n 300 -p ${SECTORG1PUB} -j \ + > ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json + +## SCAN FOR UPLANET:${UMAP} in TX +if [[ -s ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json ]]; then + + intercom=$(jq -r '.[] | select(.comment | test("UPLANET:'"${UMAP}"'")) | .comment' ~/.zen/tmp/${MOATS}/${SECTOR}.g1history.json) + ipfs_pop=$(echo "$intercom" | grep -oP 'UPLANET:'"${UMAP}"':/ipfs/\K[^"]+') + todate=$(echo "$intercom" | grep -oP 'UPLANET:'"${UMAP}"':\K[^:]*') + echo "SYNC ~/.zen/tmp/${MOATS}/${UMAP} <=> /ipfs/$ipfs_pop" + + ## TODO: SECURITY PATCH : check payment emitter is UMAPG1PUB + if [[ $ipfs_pop ]]; then + echo "from $todate memory slot" + ipfs --timeout 90s get -o ~/.zen/tmp/${MOATS}/${UMAP} /ipfs/$ipfs_pop + else + echo "WARNING cannot remember... scan for more TX ??!" + fi + +else + echo "FATAL ERROR cannot access to SECTORG1PUB history" + exit 1 +fi + +end=`date +%s` +echo "(${UMAP}.memory) ${todate} get time : "`expr $end - $start` seconds. + +exit 0 diff --git a/_12345.sh b/_12345.sh index 1ad19406..b1e3a8b3 100755 --- a/_12345.sh +++ b/_12345.sh @@ -43,30 +43,34 @@ echo "$(date -u)" > ~/.zen/tmp/${IPFSNODEID}/_MySwarm.staom ## MySwarm KEY INIT & SET ############################################################ ## CREATE CHAN = MySwarm_${IPFSNODEID} - CHAN=$(ipfs key list -l | grep -w "MySwarm_${IPFSNODEID}" | cut -d ' ' -f 1) +CHAN=$(ipfs key list -l | grep -w "MySwarm_${IPFSNODEID}" | cut -d ' ' -f 1) - ####################################################### - ## CREATE MySwarm KEYS ? - if [[ ${CHAN} == "" || ${CHAN} == "null" ]]; then - echo "## MAKE /proc/cpuinfo IPFSNODEID DERIVATED KEY ##" - SECRET1=$(cat /proc/cpuinfo | grep -Ev MHz | sha512sum | cut -d ' ' -f 1) - SECRET2=${IPFSNODEID} - echo "SALT=$SECRET1 && PEPPER=$SECRET2" > ~/.zen/game/myswarm_secret.june - ${MY_PATH}/tools/keygen -t ipfs -o ~/.zen/game/myswarm_secret.ipfskey "$SECRET1" "$SECRET2" - ${MY_PATH}/tools/keygen -t duniter -o ~/.zen/game/myswarm_secret.dunikey "$SECRET1" "$SECRET2" - ipfs key import "MySwarm_${IPFSNODEID}" -f pem-pkcs8-cleartext ~/.zen/game/myswarm_secret.ipfskey - CHAN=$(ipfs key list -l | grep -w "MySwarm_${IPFSNODEID}" | cut -d ' ' -f 1 ) - fi - ######################################################## MAKE IPFS NODE CHAN ID CPU RELATED +####################################################### +## CREATE MySwarm KEYS ? +if [[ ${CHAN} == "" || ${CHAN} == "null" ]]; then +echo "## MAKE /proc/cpuinfo IPFSNODEID DERIVATED KEY ##" + SECRET1=$(cat /proc/cpuinfo | grep -Ev MHz | sha512sum | cut -d ' ' -f 1) + SECRET2=${IPFSNODEID} + echo "SALT=$SECRET1 && PEPPER=$SECRET2" > ~/.zen/game/myswarm_secret.june + ${MY_PATH}/tools/keygen -t ipfs -o ~/.zen/game/myswarm_secret.ipfskey "$SECRET1" "$SECRET2" + ${MY_PATH}/tools/keygen -t duniter -o ~/.zen/game/myswarm_secret.dunikey "$SECRET1" "$SECRET2" + ipfs key import "MySwarm_${IPFSNODEID}" -f pem-pkcs8-cleartext ~/.zen/game/myswarm_secret.ipfskey + CHAN=$(ipfs key list -l | grep -w "MySwarm_${IPFSNODEID}" | cut -d ' ' -f 1 ) + fi +######################################################## MAKE IPFS NODE CHAN ID CPU RELATED ## PUBLISH CHANNEL IPNS - echo "" > ~/.zen/tmp/${IPFSNODEID}/_MySwarm.$(myHostName).html +echo "" > ~/.zen/tmp/${IPFSNODEID}/_MySwarm.$(myHostName).html ############################################################ ############################################################ echo 0 > ~/.zen/tmp/random.sleep ################### # NEVER ENDING LOOP + +#### UPLANET FLASHMEM UPDATES +${MY_PATH}/RUNTIME/UPlanetKEYS_refresh.sh & + ################################################################### ## WILL SCAN ALL BOOSTRAP - REFRESH "SELF IPNS BALISE" - RECEIVE UPLINK ORDERS ################################################################### @@ -81,175 +85,175 @@ while true; do ## FIXING TIC TAC FOR NODE & SWARM REFRESH ( 1H ) if [[ ${duree} -gt 3600000 ]]; then - ${MY_PATH}/ping_bootstrap.sh + ${MY_PATH}/ping_bootstrap.sh - #### UPLANET FLASHMEM UPDATES - ${MY_PATH}/UPlanetKEYS_refresh.sh & + #### UPLANET FLASHMEM UPDATES + ${MY_PATH}/RUNTIME/UPlanetKEYS_refresh.sh & - PLAYERONE=($(ls -t ~/.zen/game/players/ | grep "@" 2>/dev/null)) - [[ ${PLAYERONE[@]} == "" ]] && echo "EMPTY ASTROPORT - NO PLAYER - NO PUBLISHING" && continue + PLAYERONE=($(ls -t ~/.zen/game/players/ | grep "@" 2>/dev/null)) + [[ ${PLAYERONE[@]} == "" ]] && echo "EMPTY ASTROPORT - NO PLAYER - NO PUBLISHING" && continue - ##################################### - ( ##### SUB-PROCESS £ - start=`date +%s` + ##################################### + ( ##### SUB-PROCESS £ + start=`date +%s` - # MONITOR pending - for player in ${PLAYERONE[@]}; do - g1pub=$(cat ~/.zen/game/players/${player}/.g1pub 2>/dev/null) - # Check Station PLAYER payments - PENDINGS=($(ls "$HOME/.zen/game/pending/${g1pub}/*.TX")) - for pending in "${PENDINGS[@]}"; do - echo ${pending} - # TODO TREAT PENDINGS - # + # MONITOR pending + for player in ${PLAYERONE[@]}; do + g1pub=$(cat ~/.zen/game/players/${player}/.g1pub 2>/dev/null) + # Check Station PLAYER payments + PENDINGS=($(ls "$HOME/.zen/game/pending/${g1pub}/*.TX")) + for pending in "${PENDINGS[@]}"; do + echo ${pending} + # TODO TREAT PENDINGS + # + done done - done - ############# GET BOOSTRAP SWARM DATA - for bootnode in $(cat ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | grep -Ev "#" | grep -v '^[[:space:]]*$') # remove comments and empty lines - do + ############# GET BOOSTRAP SWARM DATA + for bootnode in $(cat ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | grep -Ev "#" | grep -v '^[[:space:]]*$') # remove comments and empty lines + do - ## ex: /ip4/149.102.158.67/tcp/4001/p2p/12D3KooWL2FcDJ41U9SyLuvDmA5qGzyoaj2RoEHiJPpCvY8jvx9u) - echo "############# RUN LOOP ######### $(date)" - ipfsnodeid=${bootnode##*/} + ## ex: /ip4/149.102.158.67/tcp/4001/p2p/12D3KooWL2FcDJ41U9SyLuvDmA5qGzyoaj2RoEHiJPpCvY8jvx9u) + echo "############# RUN LOOP ######### $(date)" + ipfsnodeid=${bootnode##*/} - [[ ${ipfsnodeid} == ${IPFSNODEID} ]] && echo "MYSELF : ${IPFSNODEID} - CONTINUE" && continue + [[ ${ipfsnodeid} == ${IPFSNODEID} ]] && echo "MYSELF : ${IPFSNODEID} - CONTINUE" && continue - [[ ${ipfsnodeid} == "null" || ${ipfsnodeid} == "" ]] && echo "BAD ${IPFSNODEID} - CONTINUE" && continue + [[ ${ipfsnodeid} == "null" || ${ipfsnodeid} == "" ]] && echo "BAD ${IPFSNODEID} - CONTINUE" && continue - ## SWARM CONNECT - ipfs swarm connect ${bootnode} + ## SWARM CONNECT + ipfs swarm connect ${bootnode} - ## PREPARE TO REFRESH SWARM LOCAL CACHE - mkdir -p ~/.zen/tmp/swarm/${ipfsnodeid} - mkdir -p ~/.zen/tmp/-${ipfsnodeid} + ## PREPARE TO REFRESH SWARM LOCAL CACHE + mkdir -p ~/.zen/tmp/swarm/${ipfsnodeid} + mkdir -p ~/.zen/tmp/-${ipfsnodeid} - ## GET bootnode IP - iptype=$(echo ${bootnode} | cut -d '/' -f 2) - nodeip=$(echo ${bootnode} | cut -d '/' -f 3) + ## GET bootnode IP + iptype=$(echo ${bootnode} | cut -d '/' -f 2) + nodeip=$(echo ${bootnode} | cut -d '/' -f 3) - ## IPFS GET TO /swarm/${ipfsnodeid} - echo "GETTING ${nodeip} : /ipns/${ipfsnodeid}" - ipfs --timeout 720s get -o ~/.zen/tmp/-${ipfsnodeid}/ /ipns/${ipfsnodeid}/ + ## IPFS GET TO /swarm/${ipfsnodeid} + echo "GETTING ${nodeip} : /ipns/${ipfsnodeid}" + ipfs --timeout 720s get -o ~/.zen/tmp/-${ipfsnodeid}/ /ipns/${ipfsnodeid}/ - ## SHOW WHAT WE GET - echo "__________________________________________________" - ls ~/.zen/tmp/-${ipfsnodeid}/ - echo "__________________________________________________" + ## SHOW WHAT WE GET + echo "__________________________________________________" + ls ~/.zen/tmp/-${ipfsnodeid}/ + echo "__________________________________________________" - ## LOCAL CACHE SWITCH WITH LATEST - if [[ -s ~/.zen/tmp/-${ipfsnodeid}/_MySwarm.moats ]]; then - if [[ $(diff ~/.zen/tmp/-${ipfsnodeid}/_MySwarm.moats ~/.zen/tmp/swarm/${ipfsnodeid}/_MySwarm.moats) || $(cat ~/.zen/tmp/swarm/${ipfsnodeid}/_MySwarm.moats 2>/dev/null) == "" ]]; then - rm -Rf ~/.zen/tmp/swarm/${ipfsnodeid} - mv ~/.zen/tmp/-${ipfsnodeid} ~/.zen/tmp/swarm/${ipfsnodeid} - echo "UPDATED : ~/.zen/tmp/swarm/${ipfsnodeid}" + ## LOCAL CACHE SWITCH WITH LATEST + if [[ -s ~/.zen/tmp/-${ipfsnodeid}/_MySwarm.moats ]]; then + if [[ $(diff ~/.zen/tmp/-${ipfsnodeid}/_MySwarm.moats ~/.zen/tmp/swarm/${ipfsnodeid}/_MySwarm.moats) || $(cat ~/.zen/tmp/swarm/${ipfsnodeid}/_MySwarm.moats 2>/dev/null) == "" ]]; then + rm -Rf ~/.zen/tmp/swarm/${ipfsnodeid} + mv ~/.zen/tmp/-${ipfsnodeid} ~/.zen/tmp/swarm/${ipfsnodeid} + echo "UPDATED : ~/.zen/tmp/swarm/${ipfsnodeid}" + else + echo "TimeStamp unchanged : $(cat ~/.zen/tmp/swarm/${ipfsnodeid}/_MySwarm.moats)" + rm -Rf ~/.zen/tmp/-${ipfsnodeid}/ + continue + fi else - echo "TimeStamp unchanged : $(cat ~/.zen/tmp/swarm/${ipfsnodeid}/_MySwarm.moats)" - rm -Rf ~/.zen/tmp/-${ipfsnodeid}/ + echo "UNREACHABLE /ipns/${ipfsnodeid}/" continue fi - else - echo "UNREACHABLE /ipns/${ipfsnodeid}/" - continue - fi - ## ASK BOOSTRAP NODE TO GET MY MAP UPSYNC - ## - MAKES MY BALISE PRESENT IN BOOSTRAP SWARM KEY - - if [[ $iptype == "ip4" || $iptype == "ip6" ]]; then + ## ASK BOOSTRAP NODE TO GET MY MAP UPSYNC + ## - MAKES MY BALISE PRESENT IN BOOSTRAP SWARM KEY - + if [[ $iptype == "ip4" || $iptype == "ip6" ]]; then - ############ UPSYNC CALL - echo "STATION MAP UPSYNC : curl -s http://${nodeip}:12345/?${NODEG1PUB}=${IPFSNODEID}" - curl -s -m 10 http://${nodeip}:12345/?${NODEG1PUB}=${IPFSNODEID} -o ~/.zen/tmp/swarm/${ipfsnodeid}/map.${nodeip}.json + ############ UPSYNC CALL + echo "STATION MAP UPSYNC : curl -s http://${nodeip}:12345/?${NODEG1PUB}=${IPFSNODEID}" + curl -s -m 10 http://${nodeip}:12345/?${NODEG1PUB}=${IPFSNODEID} -o ~/.zen/tmp/swarm/${ipfsnodeid}/map.${nodeip}.json - ## LOOKING IF ITS SWARM MAP COULD COMPLETE MINE - echo "ANALYSING BOOSTRAP SWARM MAP" - itipnswarmap=$(cat ~/.zen/tmp/swarm/${ipfsnodeid}/map.${nodeip}.json | jq -r '.g1swarm' | rev | cut -d '/' -f 1 | rev ) - ipfs ls /ipns/${itipnswarmap} | rev | cut -d ' ' -f 1 | rev | cut -d '/' -f 1 > ~/.zen/tmp/_swarm.${ipfsnodeid} + ## LOOKING IF ITS SWARM MAP COULD COMPLETE MINE + echo "ANALYSING BOOSTRAP SWARM MAP" + itipnswarmap=$(cat ~/.zen/tmp/swarm/${ipfsnodeid}/map.${nodeip}.json | jq -r '.g1swarm' | rev | cut -d '/' -f 1 | rev ) + ipfs ls /ipns/${itipnswarmap} | rev | cut -d ' ' -f 1 | rev | cut -d '/' -f 1 > ~/.zen/tmp/_swarm.${ipfsnodeid} - echo "================ ${nodeip}:12345 ZNODS LIST" - cat ~/.zen/tmp/_swarm.${ipfsnodeid} - echo "============================================" - for znod in $(cat ~/.zen/tmp/_swarm.${ipfsnodeid}); do - # CHECK znod validity - cznod=$(${MY_PATH}/tools/ipfs_to_g1.py ${znod} 2>/dev/null) - [[ ${cznod} == "" || ${cznod} == "null" ]] && echo "xxxxxxxxxxxx BAD ${znod} xxxx ON xxxxxx ${ipfsnodeid} - ERROR - CONTINUE" && continue + echo "================ ${nodeip}:12345 ZNODS LIST" + cat ~/.zen/tmp/_swarm.${ipfsnodeid} + echo "============================================" + for znod in $(cat ~/.zen/tmp/_swarm.${ipfsnodeid}); do + # CHECK znod validity + cznod=$(${MY_PATH}/tools/ipfs_to_g1.py ${znod} 2>/dev/null) + [[ ${cznod} == "" || ${cznod} == "null" ]] && echo "xxxxxxxxxxxx BAD ${znod} xxxx ON xxxxxx ${ipfsnodeid} - ERROR - CONTINUE" && continue - if [[ ! -d ~/.zen/tmp/swarm/${znod} ]]; then - echo "COMPLETING MY SWARM DATA WITH ZNOD=${znod}" - mkdir -p ~/.zen/tmp/swarm/${znod} - ipfs --timeout 180s get -o ~/.zen/tmp/swarm/${znod} /ipns/${znod} - else - echo "____________ KNOW ${znod}" - # TODO : SPEEDUP REFRESH COMPARE _MySwarm.moats AND KEEP LASTEST - fi + if [[ ! -d ~/.zen/tmp/swarm/${znod} ]]; then + echo "COMPLETING MY SWARM DATA WITH ZNOD=${znod}" + mkdir -p ~/.zen/tmp/swarm/${znod} + ipfs --timeout 180s get -o ~/.zen/tmp/swarm/${znod} /ipns/${znod} + else + echo "____________ KNOW ${znod}" + # TODO : SPEEDUP REFRESH COMPARE _MySwarm.moats AND KEEP LATEST + fi - ZMOATS=$(cat ~/.zen/tmp/swarm/${znod}/_MySwarm.moats 2>/dev/null) - MOATS_SECONDS=$(${MY_PATH}/tools/MOATS2seconds.sh ${MOATS}) - ZMOATS_SECONDS=$(${MY_PATH}/tools/MOATS2seconds.sh ${ZMOATS}) - DIFF_SECONDS=$((MOATS_SECONDS - ZMOATS_SECONDS)) - if [ ${DIFF_SECONDS} -gt $(( 3 * 24 * 60 * 60 )) ]; then - echo "STATION IS STUCK... FOR TOO LONG... REMOVING FROM SWARM" - rm -Rf ~/.zen/tmp/swarm/${znod}/ - else - echo "${DIFF_SECONDS} seconds old" - fi + ZMOATS=$(cat ~/.zen/tmp/swarm/${znod}/_MySwarm.moats 2>/dev/null) + MOATS_SECONDS=$(${MY_PATH}/tools/MOATS2seconds.sh ${MOATS}) + ZMOATS_SECONDS=$(${MY_PATH}/tools/MOATS2seconds.sh ${ZMOATS}) + DIFF_SECONDS=$((MOATS_SECONDS - ZMOATS_SECONDS)) + if [ ${DIFF_SECONDS} -gt $(( 3 * 24 * 60 * 60 )) ]; then + echo "STATION IS STUCK... FOR TOO LONG... REMOVING ${znod} FROM SWARM" + rm -Rf ~/.zen/tmp/swarm/${znod}/ + else + echo "${DIFF_SECONDS} seconds old" + fi - done - echo "============================================" + done + echo "============================================" - fi ## IP4 WAN BOOTSRAP UPSYNC FINISHED + fi ## IP4 WAN BOOTSRAP UPSYNC FINISHED - done + done -############################################# - # ERASE EMPTY DIRECTORIES - du -b ~/.zen/tmp/swarm > /tmp/du - while read branch; do [[ $branch =~ "4096" ]] && echo "empty $branch" && rm -Rf $(echo $branch | cut -f 2 -d ' '); done < /tmp/du - ############### UPDATE MySwarm CHAN - ls ~/.zen/tmp/swarm - SWARMSIZE=$(du -b ~/.zen/tmp/swarm | tail -n 1 | cut -f 1) + ############################################# + # ERASE EMPTY DIRECTORIES + du -b ~/.zen/tmp/swarm > /tmp/du + while read branch; do [[ $branch =~ "4096" ]] && echo "empty $branch" && rm -Rf $(echo $branch | cut -f 2 -d ' '); done < /tmp/du + ############### UPDATE MySwarm CHAN + ls ~/.zen/tmp/swarm + SWARMSIZE=$(du -b ~/.zen/tmp/swarm | tail -n 1 | cut -f 1) - ## SIZE MODIFIED => PUBLISH MySwarm_${IPFSNODEID} - [[ ${SWARMSIZE} != $(cat ~/.zen/tmp/swarm/.bsize 2>/dev/null) ]] \ - && echo ${SWARMSIZE} > ~/.zen/tmp/swarm/.bsize \ - && SWARMH=$(ipfs add -rwq ~/.zen/tmp/swarm/* | tail -n 1 ) \ - && echo "=== ~/.zen/tmp/swarm EVOLVED : PUBLISHING NEW STATE ===" \ - && ipfs name publish --key "MySwarm_${IPFSNODEID}" /ipfs/${SWARMH} -############################################# + ## SIZE MODIFIED => PUBLISH MySwarm_${IPFSNODEID} + [[ ${SWARMSIZE} != $(cat ~/.zen/tmp/swarm/.bsize 2>/dev/null) ]] \ + && echo ${SWARMSIZE} > ~/.zen/tmp/swarm/.bsize \ + && SWARMH=$(ipfs add -rwq ~/.zen/tmp/swarm/* | tail -n 1 ) \ + && echo "=== ~/.zen/tmp/swarm EVOLVED : PUBLISHING NEW STATE ===" \ + && ipfs name publish --key "MySwarm_${IPFSNODEID}" /ipfs/${SWARMH} + ############################################# - ###################################### - ############# RE PUBLISH SELF BALISE + ###################################### + ############# RE PUBLISH SELF BALISE - # Clean Empty Directory (inode dependancy BUG ??) - du -b ~/.zen/tmp/${IPFSNODEID} > /tmp/du - while read branch; do [[ $branch =~ "4096" ]] && echo "empty $branch" && rm -Rf $(echo $branch | cut -f 2 -d ' '); done < /tmp/du + # Clean Empty Directory + du -b ~/.zen/tmp/${IPFSNODEID} > /tmp/du + while read branch; do [[ $branch =~ "4096" ]] && echo "empty $branch" && rm -Rf $(echo $branch | cut -f 2 -d ' '); done < /tmp/du - # Scan local cache - ls ~/.zen/tmp/${IPFSNODEID}/ - BSIZE=$(du -b ~/.zen/tmp/${IPFSNODEID} | tail -n 1 | cut -f 1) + # Scan IPFSNODEID cache + ls ~/.zen/tmp/${IPFSNODEID}/ + BSIZE=$(du -b ~/.zen/tmp/${IPFSNODEID} | tail -n 1 | cut -f 1) - ## IPFS GET LAST PUBLISHED MAP VERSION - rm -Rf ~/.zen/tmp/_${IPFSNODEID} 2>/dev/null - mkdir -p ~/.zen/tmp/_${IPFSNODEID} - ipfs get -o ~/.zen/tmp/_${IPFSNODEID}/ /ipns/${IPFSNODEID}/ - NSIZE=$(du -b ~/.zen/tmp/_${IPFSNODEID} | tail -n 1 | cut -f 1) + ## IPFS GET LAST ONLINE IPFSNODEID MAP + rm -Rf ~/.zen/tmp/_${IPFSNODEID} 2>/dev/null + mkdir -p ~/.zen/tmp/_${IPFSNODEID} + ipfs get -o ~/.zen/tmp/_${IPFSNODEID}/ /ipns/${IPFSNODEID}/ + NSIZE=$(du -b ~/.zen/tmp/_${IPFSNODEID} | tail -n 1 | cut -f 1) - ### CHECK IF SIZE DIFFERENCE ? - ## Local / IPNS size differ => FUSION LOCAL OVER ONLINE & PUBLISH - [[ ${BSIZE} != ${NSIZE} ]] \ - && echo "${MOATS}" > ~/.zen/tmp/${IPFSNODEID}/_MySwarm.moats \ - && MYCACHE=$(ipfs add -rwq ~/.zen/tmp/${IPFSNODEID}/* | tail -n 1 ) \ - && echo "PUBLISHING NEW BALISE STATE FOR STATION /ipns/${IPFSNODEID} INDEXES = $BSIZE octets" \ - && ipfs name publish /ipfs/${MYCACHE} + ### CHECK IF SIZE DIFFERENCE ? + ## Local / IPNS size differ => FUSION LOCAL OVER ONLINE & PUBLISH + [[ ${BSIZE} != ${NSIZE} ]] \ + && echo "${MOATS}" > ~/.zen/tmp/${IPFSNODEID}/_MySwarm.moats \ + && MYCACHE=$(ipfs add -rwq ~/.zen/tmp/${IPFSNODEID}/* | tail -n 1 ) \ + && echo "PUBLISHING NEW BALISE STATE FOR STATION /ipns/${IPFSNODEID} INDEXES = $BSIZE octets" \ + && ipfs name publish /ipfs/${MYCACHE} - end=`date +%s` - echo "(*__*) MySwam Update ($BSIZE B) duration was "`expr $end - $start`' seconds. '$(date) + end=`date +%s` + echo "(*__*) MySwam Update ($BSIZE B) duration was "`expr $end - $start`' seconds. '$(date) - ) & ##### SUB-PROCESS + ) & ##### SUB-PROCESS - # last run recording - echo "${MOATS}" > ~/.zen/tmp/${IPFSNODEID}/_MySwarm.moats - echo "$(date -u)" > ~/.zen/tmp/${IPFSNODEID}/_MySwarm.staom + # last run recording + echo "${MOATS}" > ~/.zen/tmp/${IPFSNODEID}/_MySwarm.moats + echo "$(date -u)" > ~/.zen/tmp/${IPFSNODEID}/_MySwarm.staom else @@ -286,6 +290,7 @@ Content-Type: application/json; charset=UTF-8 if [[ $T2WAIT == 0 || $T2WAIT != $(cat ~/.zen/tmp/random.sleep 2>/dev/null) ]]; then ( + echo "# AUTO RELAUNCH IN $T2WAIT SECONDS" echo $T2WAIT > ~/.zen/tmp/random.sleep sleep $T2WAIT && rm ~/.zen/tmp/random.sleep curl -s "http://127.0.0.1:12345" @@ -311,16 +316,16 @@ Content-Type: application/json; charset=UTF-8 ##################################################################### if [[ ${arr[0]} != "" ]]; then - ## CHECK URL CONSISTENCY ( G1PUB=IPNSPUB is right ? ) + ## CHECK URL CONSISTENCY ( do we get G1PUB=IPNSPUB right ? ) GPUB=${arr[0]} ASTROTOIPFS=$(${MY_PATH}/tools/g1_to_ipfs.py ${arr[0]} 2>/dev/null) if [[ "${ASTROTOIPFS}" == "${arr[1]}" && ${ASTROTOIPFS} != "" && ${arr[1]} != "" ]]; then ## WE SPEAK THE SAME PROTOCOL - echo "MAJOR TOM TO GROUD CONTROL" echo "WE HAVE A STATION ${GPUB} CONTACT" ( mkdir -p ~/.zen/tmp/swarm/${ASTROTOIPFS} + echo "<<< MAJOR TOM TO GROUND CONTROL >>>" echo "UPSYNC TO ~/.zen/tmp/swarm/${ASTROTOIPFS}" ipfs --timeout 180s get -o ~/.zen/tmp/swarm/${ASTROTOIPFS} /ipns/${ASTROTOIPFS} ) & diff --git a/adventure/BLOCKCHAIN/nathan.piazzi@ynov.com/me b/adventure/BLOCKCHAIN/nathan.piazzi@ynov.com/me new file mode 100644 index 00000000..2ae2bb5a --- /dev/null +++ b/adventure/BLOCKCHAIN/nathan.piazzi@ynov.com/me @@ -0,0 +1 @@ +Salut, je suis Nathan, 21 ans. Je suis en alternance en tant que Data Analyst où je fais surtout du Power BI. J'adore le foot et le PSG. Je suis à YNOV depuis le B3 et voilà diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/adventure.sh b/adventure/games/antonio.gernacaleixo@ynov.com/adventure.sh new file mode 100755 index 00000000..13dadcec --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/adventure.sh @@ -0,0 +1,49 @@ +#!/bin/bash +################################################################### +# This Launch script is based on BashVenture. +# +# Remember, kids - sharing is caring! Keep it open. Spread the love. +# - @BenNunney +# Thanks and gratitude to all living creatures and the whole creation. +# - @Fred +# $AGE×365,25×24×60×60×9,807÷299792458 = RELATIVE LIGHT GRAVITY SPEED +################################################################### +# Guide avancé d'écriture des scripts Bash : https://abs.traduc.org/abs-fr/ +# GAMESHELL : https://github.com/phyver/GameShell/ +################################################################### +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +ME="${0##*/}" +################################################################### +### CREER VOTRE PROPRE VERSION DU JEU +### CHOISIR SCENARIO + +################################################################### +if hash uuidgen 2>/dev/null; then + homefolder=$(pwd) + newplayer=$(uuidgen) + ## Copy Player Game Files + mkdir -p $HOME/.zen/adventure/$newplayer + cp -r $MY_PATH/rooms $HOME/.zen/adventure/$newplayer/rooms + cp -r $MY_PATH/art $HOME/.zen/adventure/$newplayer/art + cp -r $MY_PATH/script $HOME/.zen/adventure/$newplayer/script + cp -r $MY_PATH/logic $HOME/.zen/adventure/$newplayer/logic +fi +################################################################### +echo "Loading..." +echo +sleep 4 +################################################################### +if hash uuidgen 2>/dev/null; then + cd $HOME/.zen/adventure/$newplayer/rooms +else + cd rooms +fi +./start.sh +################################################################### +if hash uuidgen 2>/dev/null; then + cd "$homefolder" + rm -r $HOME/.zen/adventure/$newplayer +fi +echo "To continue..." +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/art/Gune.ben b/adventure/games/antonio.gernacaleixo@ynov.com/art/Gune.ben new file mode 100644 index 00000000..dedb1304 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/art/Gune.ben @@ -0,0 +1,21 @@ + + + .';:llllc;'. + .:xXWX;.,ll;.:XWXx;. + ;0MMMMMMKl;'',l0MMMMMWO, + ,0MMMMMMW0dc;,,;cd0WMMMMMMO. + dWMMMMM0; ;OMMMMMN: + dMMMMMN: .,'. cWMMMMMc + ,WMMMMX. .xNMMMMNx,'lONMMMMMMN. + oMMMMM: :WMMMMMMMMMMMMMMMMMMMMc + xMMMMM' xMMMMMMOlllllllloNMMMMo + oMMMMMc ,NMMMMMWd. KMMMM: + .WMMMMN, .l0NWWWKc KMMMX. + cMMMMMWo .. KMMW; + cWMMMMMXo' .lKd. KMK' + .xWMMMMMMN0dlllldONMMMMWOXd + .xNMMMMMMMd''lWMMMMMMXo. + 'lONWMW, .XMWXOl. + ..,,..,,.. + + diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/art/astrologo.ben b/adventure/games/antonio.gernacaleixo@ynov.com/art/astrologo.ben new file mode 100644 index 00000000..64180c37 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/art/astrologo.ben @@ -0,0 +1,21 @@ + + .':cdxxxxxoc;. + .:x00dc;'..:..,:lk00o' + ;0Xd, oMo :OXx. + :KK; cMMMl .oNk. + .kN: ;MMMMMc xNl + .0K. ,WMMMMMW; ;Wo + OX. ,WMMMMMMMW; ;Wc + cM; .WMMMMMMMMMW, kX. + OX .NMMMMMMMMMMMW' ,Mc + O0 .NMMMMMMMMMMMMMW' .Mc + ON .XMMMMM0kkkkKMMMMN. ,M: + :M; KMMMMM: .,,;dMMMMMN. kX. + ON. 0MMMMMl ,WMMMMMMMMMMX. ;Wc + .0K. 0MMMMMd 'WMMMMMMMMMMMMX. :Wo + .xN: kMMMMMO .XWWWWNNNNNXXKKKd xNc + ;0Xl. .oXx. + ,OXx, .cOKd. + ;d00xl:,....';coO0Ol' + .;:odddddl:,. + diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/art/astroportland.ben b/adventure/games/antonio.gernacaleixo@ynov.com/art/astroportland.ben new file mode 100644 index 00000000..f27e1fd1 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/art/astroportland.ben @@ -0,0 +1,21 @@ +MMMMMMMMMMMMMMMMMMMl xxlxxxd . KNNMNl. 'd0xdddkXKxc. ,dNMMMMMMMMMMMMMMM +MMMMMMMMMMMWKOl:cc' .NNOMXNX .ld; ,lxXMMMMMMMMMMM +MMMMMMMMNo. ,,' .KKWMOXX .. .dWMMMMMMMM +MMMMMMWc cdddc .NNNMXNX .do '' ' .:,:k; l, .KMMMMMMM +MMMMMW, ;ll: .,:ddddd .KKOM0XX .do '0MMXMo . dMMMMMMXOMX0: XMMMMMM +MMMMMo xc:d 'ddddddd .XXWMK00' .do .oo. .dMMMMMMO;lWNMMMMMMWXMMMX: :MMMMMM +MMMMW. .cXKKXWooK0kk0d0Oxxkkx .XXNM0Ok; .:ol:'do,0MMK ... 'XMMMMMMMMMMMMMMMMMWWMMMMx .dkONMM +MKNK. NMWooOWllKKoMNll0MM0x0 xNXXOMKOkKOoM0kkkOkWMMMM0NWWXXMMMMMMMMMMW:WkWk0OKMWdOMNxd0O. .KM +l dkkMMWloOWcc0KoMNccOMMxl0cMMXXWM0KOMMMM0OkkOKMMMMMMMMMMMMMMMMMMMMM0 : o.. 'll.lMMMMMMx .O + ;kMMMMMWlckWooKXdMNccOMMxlXk0MMMNMMMMMMMM0OkkOWMMMMMMMMMMMMMMMMMMMMMMo0OWW,xNWKcooMM0NN0Oc + .NMMMMMMNllkWllKKoMNll0MMxlNxOMMMOMMMMMMMM0OkOOWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNMMNdxMMMk + ;WMMMMMMMMMMMNNWWNMMMMMMMWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWMWx. + :MMkxxxWMMMWkxxxxxxxWXxxxxxxxxKWxxxxxxxxxWMMKxxxxxxKMMKxxxxxxxxKMMXxxxxxx0MMkxxxxxxxxNMXxdlloodO: + :N, OMM0. 'N. 0: :Mc XK Nx kl ,N. ;' +x..M0xddddKMMOddddddddKKddddddddxNxdddddddddOWoooooooooN0ddddddddddNdoooooooo0xdddddddddkKdddddddox. +MWKK ,MN. .,XMMMMl ;MMMM' xc 'MMd .Mx ;x .NMO N; dMMMl ,W +MMMK NM:. 'MMMW. xMMMO dW. oMM. lM' .:N, ;MM; ;K oMMMW. dO +MMMMMMMo xXXXXXk .MMMO NMMM; .WWN. 00 XM0 KK 0WWWWMMW OMX kc .WWW. OMMMO Nc +MMMMMMMX dMMM; ;MMMN dMMk N0 .. oMl .MMMMMMMN ... :W. lMM0 XMMM; ;M' .c +MMMMMMMM, .xMMMW. kMMMx .NMM: cMMd. .;0MM. oMMMMMMMMk. .,kMO XMMl :MMMW. kMOKMM +MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/art/astrored.ben b/adventure/games/antonio.gernacaleixo@ynov.com/art/astrored.ben new file mode 100644 index 00000000..7ed4a2b8 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/art/astrored.ben @@ -0,0 +1,21 @@ + .,'. + .,,;,'',;,'',,.'. + .;;,,.. .........' + .l:. ............cc. + .c, .................:c. + .lc ................... .l; + l' ... .............. c: + :: .. ........... l' + d . .''...... 'o + .o .. ''''''. l + .d . ......''''''' l + o . .,,,,,,'''''' 'l + ;: . ',,,,''''', l. + l, .. .,,,''''', oc + .lc .',,,''',. .c, + 'l, .,,''',..:c. + ';;. .,,',,:;. + ':;;'. .;:,,,. + .,,'''''','..;,,. + ,:. + ., diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/art/bigfinish.ben b/adventure/games/antonio.gernacaleixo@ynov.com/art/bigfinish.ben new file mode 100755 index 00000000..8ca22cfc --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/art/bigfinish.ben @@ -0,0 +1,9 @@ + _______ _ ______ _ + |__ __| | | ____| | | + | | | |__ ___ | |__ _ __ __| | + | | | '_ \ / _ \ | __| | '_ \ / _` | + | | | | | | __/ | |____| | | | (_| |_ + |_| |_| |_|\___| |______|_| |_|\__,_(_) + + + \ No newline at end of file diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/art/logoastro.ben b/adventure/games/antonio.gernacaleixo@ynov.com/art/logoastro.ben new file mode 100644 index 00000000..859e4af1 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/art/logoastro.ben @@ -0,0 +1,21 @@ + + + .:dO0NNkNX0ko,. + .:OWMMMMMMc cWMMMMMXd, + 'kWMMMMMMMMc cWMMMMMMMNo. + .kMMMMMMMMMMo lMMMMMMMMMWl + .KMMMMMMMMMMd oMMMMMMMMMMx + .XMMMMMMMMMMk dMMMMMMMMMMx + xMMMMMMMMMM0 OMMMMMMMMMM, + .NMMMMMMMMMK. OMMMMMMMMMk + 'MMMMMMMMMK. OMMMMMMMMK + .NMMMMMMMK. ,;;;;' OMMMMMMMx + dMMMMMMX. kMKkxxc 0MMMMMM, + .KMMMMN. dMx .KMMMMd + .0MMN. cMx .KMMd + xW' 'W0. ......:Xc + .lXNNWNWMMMMMMMMMMMMMMMMXl + ;xXMMMMMMMMMMMMMMWKo' + .,lxkKKKK0kdc' + + diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/art/supper.ben b/adventure/games/antonio.gernacaleixo@ynov.com/art/supper.ben new file mode 100755 index 00000000..e1806a8a --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/art/supper.ben @@ -0,0 +1,10 @@ + _____ _ _ + / ____| (_) | | + | (___ _ _ _ __ _ __ _ __ _ ___ ___| | + \___ \| | | | '__| '_ \| '__| / __|/ _ \ | + ____) | |_| | | | |_) | | | \__ \ __/_| + |_____/ \__,_|_| | .__/|_| |_|___/\___(_) + | | + |_| + + \ No newline at end of file diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/art/titleart.ben b/adventure/games/antonio.gernacaleixo@ynov.com/art/titleart.ben new file mode 100755 index 00000000..6da1d7df --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/art/titleart.ben @@ -0,0 +1,9 @@ + _ _ _ ____ ___ _ ____ + / \ ___| |_ _ __ ___ _ __ ___ _ __| |_ |___ \ / _ \ _ / |___ \ + / _ \ / __| __| '__/ _ \| '_ \ / _ \| '__| __| __) | | | | (_) | | __) | + / ___ \\__ \ |_| | | (_) | |_) | (_) | | | |_ / __/| |_| | _ | |/ __/ +/_/ \_\___/\__|_| \___/| .__/ \___/|_| \__| |_____|\___/ (_) |_|_____| + |_| + + --- Un JEu de Forêt Jardin en Monnaie Libre sur IPFS --- + diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/logic/leverlogic.ben b/adventure/games/antonio.gernacaleixo@ynov.com/logic/leverlogic.ben new file mode 100755 index 00000000..b3d86404 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/logic/leverlogic.ben @@ -0,0 +1 @@ +on diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/logic/stationlogic.ben b/adventure/games/antonio.gernacaleixo@ynov.com/logic/stationlogic.ben new file mode 100755 index 00000000..cfb931e4 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/logic/stationlogic.ben @@ -0,0 +1 @@ +off diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/note b/adventure/games/antonio.gernacaleixo@ynov.com/note new file mode 100644 index 00000000..75754038 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/note @@ -0,0 +1,2 @@ + +Pour voir les nouvelles fonctionnalités il faut monter tout au nord et rejoindre le Valhalla. \ No newline at end of file diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/bigroom.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/bigroom.sh new file mode 100755 index 00000000..a3463cf3 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/bigroom.sh @@ -0,0 +1,58 @@ +#!/bin/bash +clear +# Initialise the Title Art +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" + +# This is close to the endgame, but affords the player a last set of things to try and do. +# Obviously if you use this framework to create a game of your own, you can extend this massively. + +echo +sleep 1 +echo "Vous décidez de sortir de la Sation Astroport." +echo + echoleverstate=`cat ../logic/stationlogic.ben` + if [ "$leverstate" = "on" ]; then + + sleep 2 + echo "Il ne dépend que de vous d'explorer ce nouveau futur." + echo "Le Visa MadeInZion inaugure un monde sans territoire, sans frontière, transnationnal, interplanétaire, à vous de voir?" + sleep 2 + echo "Avant de nous rejoindre. Visitez notre 'bon coin' https://gchange.fr " + echo + sleep 3 + echo "Ouvrez une ambassade? Installez IPFS, devenons hébergeur, fournisseur d'accès de nos Internets." + echo + sleep 4 + echo "Ouvrez votre propriété au futur en commun, activez Astroport." + echo "Nous organisons des formations habitats posés, vissés et cousus. Eau potable. Biogaz, Marmite Norvégienne..." + echo "Comment nourrir le sol, reconnaitre les plantes... Redevenir ceuilleur, créateur." + echo + else + echo "" + echo "Aucune entrée n'est visible." + fi +echo +sleep 5 +echo +echo "Que voulez vous faire?" + +while true; do + read -p "> " nsewuh + case $nsewuh in + n ) echo "Pas moyen de se déplacer." ;; + s ) echo ".Pas le choix." ;; + e ) echo "Pas par là." ;; + w ) echo "Plus à l'ouest que ça? Y'a pas!" ;; + u ) ./end.sh + exit ;; + h ) echo "Comment refuser une telle proposition..." ;; + * ) echo "Je suis désolé, je ne vous comprends pas. Les commandes sont : n, e, s, w, u et h..";; + esac +done + +esac +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/brown.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/brown.sh new file mode 100755 index 00000000..08ab556a --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/brown.sh @@ -0,0 +1,62 @@ +#!/bin/bash +clear +# Initialise the Title Art +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo +sleep 1 + +# Here's this room's script. + +echo "Sur la direction du sud, vous traversez une zone plus sombre et humide." +echo "Le sol est glissant à cause de l'argile qui colle sous vos bottes" +echo "Vous finissez par croiser un chemin qui traverse la forêt d'Est en Ouest" +echo +echo "Un terminal informatique est installé là." +echo +echo "Il ressemble à une grosse calculatrice" + + +# Here we tell the player whether the lever is on or off. +leverstate=`cat ../logic/leverlogic.ben` + if [ "$leverstate" = "on" ]; then + echo "'VISA SVP' clignote sur l'écran..." + else + echo "La machine affiche l'heure : 20:12" + fi +echo +echo "Il est tard pour explorer le chemin à pied, vous devriez retourner d'où vous venez." +echo +echo "Que faites vous?" + +# In this set of actons lies the logic switch used later in the game. +# You have to set this switch to reach the endgame. +while true; do + read -p "> " nsewuh + case $nsewuh in + n ) ./mainroom.sh + exit ;; + s ) echo "Si vous continuez à marcher dans la forêt. Vous allez vous perdre..." ;; + e ) echo "Le chemin qui part à l'Est est plein de boue... Impossble d'aller par là." ;; + w ) echo "Une rivière vous empêche de passer." ;; + u ) leverstate=`cat ../logic/leverlogic.ben` + if [ "$leverstate" = "on" ]; then + echo "A chaque frappe d'une touche. l'écran fait défiler le texte 'SCANNEZ VISA SVP'." + else + sed -i='' 's/off/on/' ../logic/leverlogic.ben + echo "Vous pianotez sur l'appareil..." + sleep 3 + echo "A moment où vous touchez la touche '#' L'écran se met à clignoter..." + echo "Puis le message 'ACTIVATION STATION' défile sur les caractères lumineux." + fi + ;; + h ) echo "Le terminal comporte un clavier numérique. Un petit écran.. Il est réalisé avec un mini ordinateur Raspberry Pi. Il porte l'adresse G1TAG [https://g1sms.fr]" ;; + * ) echo "Je suis désolé, je ne vous comprends pas. Les commandes sont : n, e, s, w, u et h..";; + esac +done + +esac +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/end.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/end.sh new file mode 100755 index 00000000..5a84c0bd --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/end.sh @@ -0,0 +1,71 @@ +#!/bin/bash +clear + +# This is the endgame. This file does nothing but give you the final bit of storyline. +# Use (over-use) of 'sleep' is for dramatic effect - play around with it, see how it reads. + +# Let's reset the lever, now that we're done with it. +sed -i='' 's/on/off/' ../logic/leverlogic.ben + +# Initialise the Title Art +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo +sleep 1 +echo "Voici la fin de cette petite aventure." +echo +sleep 4 +echo "Vous venez de visiter la forêt où s'est posé Astroport ONE." +sleep 3 +echo +echo "Une oeuvre habitable. Un jardin sur sol vivant. Un progamme pair à pair interplanétaire" +sleep 4 +echo +echo "Les terraformeurs" +echo "En quête de la meilleure façon de vivre sur le vaisseau spatial Terre..." +echo +sleep 5 +echo "Vous aussi ouvrez votre Ambassade." +echo "Activez le JEu. Invitez vos visiteurs à rêver d'un monde meilleur" +echo "Reproduisez, améliorez, partagez les plans pour y parvenir." +echo +sleep 7 +echo "Il est l'heure de laisser derrière vous la civilisation thermo industrielle." +echo "Gagnez en autonomie, en convivialité, en optimisme, en conscience." +echo +sleep 5 +echo +echo "EMBARQUEZ VERS LE FUTUR" +echo +sleep 9 +echo +file1="../art/bigfinish.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo +echo +read -p "Appuyez sur [ENTER] pour terminer..." +echo +clear +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo +echo "Merci d'avoir joué le jeu" +echo "Je suis heureux de vous avoir fait partager le rêve des astronautes terraformeurs." +echo +echo "Le futur ne se prédit pas, il se construit. Il se vit." +echo +echo " - @Fred" +echo + +# That's all, folks! + +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/gameroom.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/gameroom.sh new file mode 100755 index 00000000..dbdb370d --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/gameroom.sh @@ -0,0 +1,88 @@ +#!/bin/bash +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +ME="${0##*/}" + +clear +# Initialise the Title Art +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo + +# This room gives the player a typical poisoned apple style scenaro. +# Just because something looks shiny and fun, doesn't make it any +# less deadly. +sleep 1 +echo "Dans une cabine, un écran est disposé en coin. Un tout petit ordinateur" +echo "y est raccordé... D'autres fils sortent de l'appareil. Une webcam. Une imprimante." +echo +echo "Que voulez vous faire?" +myIP=$(hostname -I | awk '{print $1}' | head -n 1) +isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/") +[[ ! $myIP || $isLAN ]] && myIP="127.0.1.1" + +while true; do + read -p "> " nsewuh + case $nsewuh in + n ) echo "Vous êtes dans une cabine. Des QRCode sont collés à la parois nord" ;; + s ) echo "Cette paroie comporte un miroir. Pour se faire une beauté avant d'enregistrer une capsule vidéo." ;; + w ) ./kroo.sh + exit ;; + e ) echo "Vous êtes face à l'écran. Au dessus des hauts parleurs, une webcam" ;; + u ) leverstate=`cat ../logic/stationlogic.ben` + if [ "$leverstate" = "on" ]; then + echo "A chaque frappe d'une touche. l'écran fait défiler le texte 'SCANNEZ VISA SVP'." + else + sed -i='' 's/off/on/' ../logic/stationlogic.ben + echo "Vous appuyez sur l'interupteur de l'écran. Y apparaît alors :" + sleep 3 + echo "AMBASSADE MadeInZion - TerraPi4 - 2 To -" + echo "" + echo + sleep 2 + echo "INTERNET est dangereux. il vend vos information personnelles pour que vous deveniez un produit. " + sleep 2 + echo + echo "Rebootez INTERNET. Activez votre TW sur le Système de Fichiers Interplanétaire (IPFS)." + sleep 2 + echo + echo "On y échange en pair à pair. La monnaie y est Libre." + sleep 4 + file1="../art/astrored.ben" + while IFS= read -r line + do + echo "$line" + done <"$file1" + echo + echo + echo "____ Astroport déclenche à 20:12 la synchronisation de ses ambassades..." + echo "Rapport 2022 : https://ipfs.asycn.io/ipfs/QmUtGpGeMZvwp47ftqebVmoFWCmvroy5wEtWsKvWvDWJpR" + sleep 3 + echo + echo "ASTROPORT ONE" + echo "VISA pour le vaisseau spatial TERRE." + if [[ -d ~/.zen/Astroport.ONE ]]; then + read -p "Appuyez sur [ENTER] pour activer votre Station Astroport.ONE" + espeak "Astroport Command" > /dev/null 2>&1 + + ~/.zen/Astroport.ONE/command.sh + else + espeak "Please Install Astroport" > /dev/null 2>&1 + echo "Install Astroport.ONE ..." + echo "bash <(wget -qO- https://raw.githubusercontent.com/papiche/Astroport.ONE/master/install.sh)" + ./end.sh + fi + fi + exit + ;; + + h ) echo "'DEMARRER API http://$myIP:1234 ... Une Station Astroport.ONE.?." ;; + * ) echo "Je suis désolé, je ne vous comprends pas. Les commandes sont : n, e, s, w, u et h..";; + esac +done + +esac +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/green.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/green.sh new file mode 100755 index 00000000..d3e56110 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/green.sh @@ -0,0 +1,38 @@ +#!/bin/bash +clear +# Initialise the Title Art +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo + +# Everybody clap your hands. I mean, here is the script. +sleep 1 +echo "Vous atteignez une zone remplie de jeunes épineux" +echo "Vous reconnaissez des prunus, des aubépines." +echo "Quelques génévriers dont vous remarquez les baies noires." +echo "Un peu plus loin ce sont les ronces." +echo +echo "Plus vous progressez plus vous souffrez des épines. Existe-t-il un passage? Qui sait." +echo +echo "Que voulez vous faire?" + +# And here's what you could have won... +while true; do + read -p "> " nsewuh + case $nsewuh in + n ) echo "Un énorme roncier vous barre la route. Ca ne passe pas." ;; + s ) echo "Vers le sud, aucun passage en vue." ;; + e ) ./mainroom.sh + exit ;; + w ) echo "Vous voyez le même paysage à perte de vue" ;; + u ) echo "Vous cueillez une baie de genèvrier. Vous la portez à la bouche. Croquez. La saveur est délicieuse. La force de la plante vous envahi." ;; + h ) echo "Ce type de terrain est caractéritique des zones déboisées. La nature sort ses épines pour protéger les arbres qui poussent en dessous." ;; + * ) echo "Je suis désolé, je ne vous comprends pas. Les commandes sont : n, e, s, w, u et h..";; + esac +done + +esac +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/grue.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/grue.sh new file mode 100755 index 00000000..a6016e52 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/grue.sh @@ -0,0 +1,35 @@ +#!/bin/bash +clear +# Initialise the Title Art +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo + +# I like this room. There is no way to get out of it alive. +sleep 1 +echo "Un évier derrière une fenère, une ancienne porte d'armoire comme table." +echo "Un meuble fait de planches de bois cousues rempli de bocaux" +echo "Une glacière recouverte d'une couche d'isolant Un bruleur à gaz." +echo "C'est un espace pour cuisiner." +sleep 3 +echo +echo "Vous avez soif. Un filtre à eau gravitationnel vous fait face" +echo "vous attraper un gobelet et le remplissez à raz bord du liquide de la bombone" +echo "Vous portez le verre à vos lèvres..." +echo +sleep 5 +echo "A la première gorgée vous vous sentez ramolir. Comment savoir combien vous avez bu" +echo "quand votre corps devenu impossible à garder droit s'est éffondré sur le sol." +echo "Simplement le temps de vous demander pourquoi?" +echo +echo "Vous sombrez dans l'inconscience." +sleep 4 +echo "VOUS VOUS SENTEZ DECOLLER." +echo +read -p "Appuyez sur [ENTER] pour revenir..." +./mainroom.sh + +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/kroo.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/kroo.sh new file mode 100755 index 00000000..9b8f1a11 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/kroo.sh @@ -0,0 +1,58 @@ +#!/bin/bash +clear + +# This room gets a little artsy with sleep commands, to help with the +# narrative of the story. This is why there are two versions - foyer and foyer2. + +# Initialise the Title Art +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo + +# It's script time again... +sleep 1 +echo "Vous pénétrez à l'intérieur de l'Astroport." +echo +sleep 3 +echo "Une voix synthétique vous accueille." +espeak "Welcome. Please Identify." > /dev/null 2>&1 +echo +echo "Vous parcourez l'espace du regard" +echo "Au nord, face à vous se trouve un foyer où brule un feu." +echo +sleep 3 +echo "A l'ouest sont suspendus tuyaux, ustensiles et bocaux. Une cuisine?" +echo "A l'est il y a un genre de 'photomaton' " +sleep 2 +echo "Derrière vous, la porte par où vous êtes entré est encore ouverte." +echo +echo "Que voulez vous faire?" + +# And once again the room logic. + +while true; do + read -p "> " nsewuh + case $nsewuh in + n ) echo "Vous vous asseyez sur le grand tapis devant le feu. Vous vous relaxez un instant." + ./magic8.sh + ;; + s ) ./bigroom.sh + exit ;; + e ) ./gameroom.sh + exit ;; + w ) ./grue.sh + exit ;; + u ) echo "Vous tapotez sur le barmoètre. Une photo satellite?" + ./meteofrance.sh + exit + ;; + h ) echo "La pièce est spacieuse. La chaleur du feu agréable, à gauche on dirait une cuisine explosée, à droite une chaise moletonnée fait face à un écran." ;; + * ) echo "Je suis désolé, je ne vous comprends pas. Les commandes sont : n, e, s, w, u et h..";; + esac +done + +esac +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/kroo2.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/kroo2.sh new file mode 100755 index 00000000..ebdb5e36 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/kroo2.sh @@ -0,0 +1,40 @@ +#!/bin/bash +clear +# Initialise the Title Art +file1="titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo + +# So here's a little story all about how this script got flip-turned upside down... +sleep 1 +echo "You're in a corridor, but it's quite a small one. You got here" +echo "the first time by hugging a statue of a kitten. Standard." +echo +echo "You see a glow coming from the rooms to your east and west, and" +echo "there's a big, old looking door to the south of you." +echo +echo "What would you like to do?" + +# Imma let you finish, but here's the room choices. + +while true; do + read -p "> " nsewuh + case $nsewuh in + n ) echo "You faceplant the wall. Idiot." ;; + s ) ./bigroom.sh + exit ;; + e ) ./gameroom.sh + exit ;; + w ) ./grue.sh + exit ;; + u ) echo "There's nothing you can use right here." ;; + h ) echo "After hugging that cat you aren't sure you should try to hug yourself again." ;; + * ) echo "I'm sorry, I don't understand you. Commands are: n, e, s, w, u and h.";; + esac +done + +esac +exit \ No newline at end of file diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/magic8.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/magic8.sh new file mode 100755 index 00000000..fa8b8fd7 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/magic8.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# magic 8 ball. Yup. Pick a random number, output message +# source: https://www.linuxjournal.com/content/bash-shell-games-lets-play-go-fish + +answers=("Oui c'est certain." "C'est carrément ça." + "Sans aucun doute." "Oui - assurément." + "Comptez la dessus." "Comme je le vois, oui." "Très probablement." + "Bonne perspective." "Oui." "Les signes indiquent que oui." + "Réponse floue, essayez à nouveau." "Redemandez plus tard." + "Il vaut mieux ne pas vous le dire maintenant.." "Impossible de prédire maintenant." + "Concentrez-vous et demandez à nouveau." "N'y comptez pas." + "Ma réponse est non." "Mes sources disent que non." + "Rien de bon." "Très douteux.") + +echo "Oh ! Boule magique, dis-moi la vérité, s'il te plaît...." ; echo "" +/bin/echo -n "Quelle est votre question ? " +read question + +answer=$(( $RANDOM % 20 )) + +echo "" +echo "J'ai regardé dans le futur et je dis: " +echo " ${answers[$answer]}" ; echo "" + +sleep 3 +./mainroom.sh + +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/mainroom.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/mainroom.sh new file mode 100755 index 00000000..d8b4d8a4 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/mainroom.sh @@ -0,0 +1,45 @@ +#!/bin/bash +clear + +# This is a repeat of the opening room in the start.sh file - if the player +# wants to go back to the main room, this saves going through the whole +# start script over again. + +# Initialise the Title Art +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo + +# Shakesphere wrote this, honest. +sleep 1 +echo "Vous êtes de retour à votre point de départ." +echo "La forêt qui vous entoure est immense." +echo "Vous ne pouvez pas vraiment en imaginer la taille," +echo +echo "Vous pouvez vous diriger au nord, à l'est, au sud et à l'ouest." +echo +echo "Que voulez-vous faire ?" + +# And the room logic once again. +while true; do + read -p "> " nsewuh + case $nsewuh in + n ) ./white.sh + exit ;; + s ) ./brown.sh + exit ;; + e ) ./red.sh + exit ;; + w ) ./green.sh + exit ;; + u ) echo "Il n'y a rien que vous puissiez utiliser ici." ;; + h ) echo "Vous observez votre montre, il est 20:12" ;; + * ) echo "Je suis désolé, je ne vous comprends pas. Les commandes sont : n, e, s, w, u et h..";; + esac +done + +esac +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/meteofrance.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/meteofrance.sh new file mode 100755 index 00000000..a3526818 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/meteofrance.sh @@ -0,0 +1,58 @@ +#!/bin/bash +################################################################################ +# Author: Fred (support@qo-op.com) +# Version: 0.1 +# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) +################################################################################ +MOATS=$(date -u +"%Y%m%d%H%M%S%4N") +mkdir -p ~/.zen/tmp/${MOATS} +################################################################################ +# Choisir la source de capture +# https://fr.sat24.com/image?type=visual5HDComplete®ion=fr + +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +ME="${0##*/}" + +## TEST IPFS +[[ ! $(which ipfs) ]] && echo "Missing IPFS. Please install... https://ipfs.tech" && exit 1 + +## PREPARE FILE SYSTEM CACHE +mkdir -p ~/.zen/adventure/meteo.anim.eu +rm -f ~/.zen/adventure/meteo.anim.eu/meteo.png + +## SCRAPING meteo.png +curl -m 20 --output ~/.zen/adventure/meteo.anim.eu/meteo.png https://s.w-x.co/staticmaps/wu/wu/satir1200_cur/europ/animate.png + +if [[ ! -f ~/.zen/adventure/meteo.anim.eu/meteo.png ]]; then + + echo "Impossible de se connecter au service meteo" + exit 1 + +else + + echo "Mise à jour archive meteo : ${MOATS}" + echo ${MOATS} > ~/.zen/adventure/meteo.anim.eu/.moats + + OLDID=$(cat ~/.zen/adventure/.meteo.index 2>/dev/null) + # TODO : COMPARE SIMILAR OR NOT + # ipfs get "/ipfs/$OLDID/meteo.anim.eu/meteo.png" + + ## PREPARE NEW index.html + sed "s/_OLDID_/$OLDID/g" ${MY_PATH}/../templates/meteo_chain.html > /tmp/index.html + sed -i "s/_IPFSID_/$IPFSID/g" /tmp/index.html + sed -i "s/_DATE_/$(date -u "+%Y-%m-%d#%H:%M:%S")/g" /tmp/index.html + sed "s/_PSEUDO_/${USER}/g" /tmp/index.html > ~/.zen/adventure/index.html + + # Copy style css + cp -r ${MY_PATH}/../templates/styles ~/.zen/adventure/ + + INDEXID=$(ipfs add -rHq ~/.zen/adventure/* | tail -n 1) + echo $INDEXID > ~/.zen/adventure/.meteo.index + echo "METEO INDEX : http://127.0.0.1:8080/ipfs/$INDEXID" + + IPFS=$(ipfs add -q ~/.zen/adventure/meteo.anim.eu/meteo.png | tail -n 1) + echo $IPFS > ~/.zen/adventure/meteo.anim.eu/.chain + +fi + diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/red.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/red.sh new file mode 100755 index 00000000..d7d84245 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/red.sh @@ -0,0 +1,41 @@ +#!/bin/bash +clear +# Initialise the Title Art +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo + +# Set up the script for this room. It's a simple one! +sleep 1 +echo "Vous entrez dans l'ancienne bergerie." +echo "Un canapé mauve est installé au milieu de l'espace" +echo "Une bache transparente vous sépare du ciel." +echo +echo "Vous êtes dans une serre." +echo "Une seule sortie. A l'Ouest, d'où vous venez." +echo +echo "Que voulez-vous faire?" + +# And the choices go here. +while true; do + read -p "> " nsewuh + case $nsewuh in + n ) echo "Une fente dans le mur vous laisse observer une carcasse de voiture. Une vieille 2cv. Un grillage vous empêche de passer." ;; + s ) echo "L'emplacement d'un grand feu se trouve la. Il ne reste que de la cendre." ;; + e ) echo "Une autre pièce remplie de gravats et d'éboulis se trouve devant vous. Impossible d'y accéder." ;; + w ) ./mainroom.sh + exit ;; + u ) echo "Vous vous asseyez dans le canapé. Vous vous sentez immédiatement happé par un nuage." + sleep 2 + xdg-open "https://www.copylaradio.com/blog/blog-1/post/le-pas-a-pas-qui-libere-du-grand-mechant-cloud-36#scrollTop=0" + ;; + h ) echo "Aucun détail particulier si ce n'est une tache sur le sofa." ;; + * ) echo "Je suis désolé, je ne vous comprends pas. Les commandes sont : n, e, s, w, u et h..";; + esac +done + +esac +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/start.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/start.sh new file mode 100755 index 00000000..bd214979 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/start.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +clear + +# Logic in the game is stored in .ben files. This sample has just one 'logic' file. +# You can add more logic files by simply adding a 'sed' command and appropriate .ben file. +# First off, let us reset the game logic. Use this as an example. + +sed -i='' 's/on/off/' ../logic/leverlogic.ben + +# Who doen't love ASCII text, right? +# Next up, let's initialise the Title Art +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo + +# Next up, let's load in the initial introduction. Script is also stored in .ben files. +sleep 5 +file2="../script/opening.ben" +while IFS= read -r line +do + echo "$line" +done <"$file2" +read -p "Pressez sur [ENTER] pour démarrer..." + +#Okay, now that the introduction is out of the way, we can start the first room! +clear +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +sleep 1 + +# Here's where you introduce the room to the player. Be sure to tell them if there +# Are exits - but don't give too much away. Make it fun for them to explore! +echo +echo "La téléportation vous a placé debout au centre d'une clairière." +echo "Vous vous trouvez près d'une ancienne bergerie aux gros murs de pierres." +echo "Le toit et une bonne partie des murs sont effondrés." +echo +echo "Tout autour la forêt. Des feuillus. Quelques arbustres épineux." +echo "Sous vos pieds. Le sol est rouge parsemé de cailloux blancs." +echo +echo "Vous pouvez vous diriger selon les points cardinaux." +echo "Au nord un chemin remonte, au sud un passage descend, à l'est, la bergerie, à l'ouest, des traces d'animaux" +echo +echo "Que voulez-vous faire? Les commandes sont : n, e, s, w, u et h." + +# Now we wait for their response - and send them somewhere accordingly. +while true; do + read -p "> " nsewuh + case $nsewuh in + n ) ./white.sh + exit ;; # These lines will take the player to a new room - a new script file. + s ) ./brown.sh + exit ;; # Be sure to include 'exit' otherwise the game won't quit properly! + e ) ./red.sh + exit ;; + w ) ./green.sh + exit ;; + u ) echo "Vous ouvrez votre sac il contient une tente, des vêtements, un thermos, une scie pliante et un couteau" ;; # Something to say? You can also just echo. + h ) echo "Comment avez-vous pu arriver ici.? Des souvenirs vous reviennent... https://ipfs.copylaradio.com/ipfs/QmWyCFvvvrE1xWudCnc14oDvaztLaRZ4guvQFVkkDLwa23#JOUR%201.%20PLANETE%201." ;; + * ) echo "Je suis désolé, je ne vous comprends pas. Les commandes sont : n, e, s, w, u et h..";; + esac +done + +esac +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/valhalla.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/valhalla.sh new file mode 100755 index 00000000..7ef42166 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/valhalla.sh @@ -0,0 +1,45 @@ +#!/bin/bash +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +ME="${0##*/}" + +clear +# Initialise the Title Art +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo + +echo "Bienvenue dans la quête du Valhalla" +sleep 1 +echo "Vous vous tenez devant les portes massives du Valhalla, le grand hall où" +echo "les guerriers les plus valeureux reposent en paix, attendant Ragnarök." +echo "Quelle action souhaitez-vous entreprendre? " +while true; do + read -p "> " action + case $action in + n ) echo "Vous avancez vers le nord, à travers les brumes épaisses, cherchant l'entrée." + sleep 2 + echo "Vous êtes monter trop haut au nord, vous vous retrouvez au valhalla ... " + sleep 1 + echo "Les dieux chuchotent ... Pour sortir du Valhalla : ctrl+shift+$ et quit" + sleep 3 + telnet valhalla.com 4242 + echo "Vous tombez du Valhalla et retourner au point de départ" + sleep 4 + ./start.sh;; + s ) echo "Au sud s'étend la vaste plaine de Vigrid, où la bataille finale est destinée à se dérouler." ;; + e ) echo "À l'est, vous trouvez un ancien ruisseau dont les eaux murmurent des histoires des temps passés." ;; + w ) echo "À l'ouest, se dressent les montagnes, où les géants se cachent, préparant leur assaut contre les dieux." ;; + o ) echo "Vous offrez une prière aux dieux, espérant gagner leur faveur pour entrer dans le Valhalla." ;; + c ) echo "Loki s'est emparer de votre ordinateur, fuyez pauvre fou !!!!!." + image_url="https://ia904505.us.archive.org/9/items/download-5_20210715/download%20%285%29.jpeg" + image_path="./download (5).jpeg" + wget "$image_path" + gsettings set org.gnome.desktop.background picture-uri "$image_path" + echo "Le fond d'écran a été changé avec succès.";; + * ) echo "Les actions possibles sont : n (nord), s (sud), e (est), w (ouest), o (offrir une prière), c (crier un défi)." ;; + esac +done \ No newline at end of file diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/rooms/white.sh b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/white.sh new file mode 100755 index 00000000..c1343483 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/rooms/white.sh @@ -0,0 +1,66 @@ +#!/bin/bash +clear +# Initialise the Title Art +file1="../art/titleart.ben" +while IFS= read -r line +do + echo "$line" +done <"$file1" +echo + +#Setting up the room... +sleep 1 +echo "Vous parcourez un chemin qui monte en direction du nord.." +echo "Au sommet de cette petite colline vous découvrez un magestueux chêne" +echo "trônant au centre d'une clairière lumineuse. La forêt à cet endroit" +echo "forme un cercle tout autour..." +echo +echo "Un Astroport fait de vitres, de planches, de tôles et de chevrons" +echo "est posé là. Eclairé par les rayons du soleil." +echo +# Here we're going to check to see if the lever - the only logic we are using in this game - is on or off. +leverstate=`cat ../logic/leverlogic.ben` + if [ "$leverstate" = "on" ]; then + echo "Une poignée est apparue sur la porte de la façade..." + else + echo "Vous en faites le tour..." + echo "Aucune entrée n'est visible." + fi + +echo +echo "Pas d'autre chemin praticable que celui d'où vous venez." +echo +echo "Que voulez-vous faire ?" + +# Now lets capture this room's actions. Note that here, the actions change depending on whether or not +# the lever is on or off. If it's on, you go elsewhere. If it's off, you don't. +while true; do + read -p "> " nsewuh + case $nsewuh in + n ) echo "Vous vous aventurez dans la forêt plus au nord. Sans boussole, vous allez vous perdre rapidement... " + sleep 3 + echo "Vous vous êtes perdu... Au loin vous voyez le Valhalla" + ./valhalla.sh;; + + s ) ./mainroom.sh + exit ;; + e ) echo "Une corniche surplombe un ruisseau qui coule dans le fond de la ravine. Impossible de passer sans équipement" ;; + w ) echo "Vous voilà face à un Jardin luxuriant. Une cloture électrique le délimite et en empêche l'accès." ;; + h ) echo "Vous voyez à l'interieur de la Station une video en cours de projection..." + sleep 2 + xdg-open "https://www.youtube.com/embed/Yk-WRXKysXM" + ;; + u ) leverstate=`cat ../logic/leverlogic.ben` + if [ "$leverstate" = "on" ]; then + ./kroo.sh + exit + else + echo "Vous cherchez une ouverture... Pas la moindre. Impossible d'entrer sans commettre une effraction..." + fi + ;; + * ) echo "Je suis désolé, je ne vous comprends pas. Les commandes sont : n, e, s, w, u et h..";; + esac +done + +esac +exit diff --git a/adventure/games/antonio.gernacaleixo@ynov.com/script/opening.ben b/adventure/games/antonio.gernacaleixo@ynov.com/script/opening.ben new file mode 100755 index 00000000..398233a3 --- /dev/null +++ b/adventure/games/antonio.gernacaleixo@ynov.com/script/opening.ben @@ -0,0 +1,23 @@ +Message de la Confédération Interplanétaire + +La planète où vous vous trouvez est en danger. Les menaces sont nombreuses. +Vos gouvernements se disputent les dernières ressources. Le cycle du vivant est perturbé ! +Le "contrat social" des 'pays civilisés' vascille. Les technocrates réclament plus de contrôle. + +La commission extraterrestre est formelle. Vous êtes en danger. + +Heureusement la monnaie libre a été découverte sur votre planète! +Elle s'utilise dans un jeu 'grandeur nature'. Astroport 20:12 +Bienvenue dans l'aventure du changement de civilisation. + +Les commandes pour vous déplacer et interagir sont +'n' aller au nord, +'s' aller au sud, +'e' aller à l'est, +'w' aller à l'ouest, +'u' utiliser, +'h' observer plus en détail. + +Ctrl-C pour quitter. + + - - - diff --git a/adventure/games/nathan.fleury@ynov.com_benjamin.bouteille@ynov.com/rooms/start.sh b/adventure/games/nathan.fleury@ynov.com_benjamin.bouteille@ynov.com/rooms/start.sh index 103cb43e..a20eea7a 100755 --- a/adventure/games/nathan.fleury@ynov.com_benjamin.bouteille@ynov.com/rooms/start.sh +++ b/adventure/games/nathan.fleury@ynov.com_benjamin.bouteille@ynov.com/rooms/start.sh @@ -57,18 +57,18 @@ mot_passe_vocal(){ # Début du jeu clear echo " - _| _| - _| _| _|_| _| _| _|_|_| _|_|_| - _| _| _| _| _| _| _| _| _| - _| _| _| _| _| _| _| _| _| - _| _|_| _|_|_| _| _| _|_|_| - _| - _|_| - _| _| _| - _| _| _|_|_| _|_|_| _| _| _|_| _| _|_| - _|_|_|_| _| _| _| _|_| _|_|_|_| _|_| - _| _| _| _| _| _| _| _| _| - _| _| _|_|_| _|_|_| _| _| _|_|_| _| + _| _| + _| _| _|_| _| _| _|_|_| _|_|_| + _| _| _| _| _| _| _| _| _| + _| _| _| _| _| _| _| _| _| + _| _|_| _|_|_| _| _| _|_|_| + _| + _|_| + _| _| _| + _| _| _|_|_| _|_|_| _| _| _|_| _| _|_| + _|_|_|_| _| _| _| _|_| _|_|_|_| _|_| + _| _| _| _| _| _| _| _| _| + _| _| _|_|_| _|_|_| _| _| _|_|_| _| " sleep 1 diff --git a/adventure/games/remi.montagut@ynov.com/me.md b/adventure/games/remi.montagut@ynov.com/me.md new file mode 100644 index 00000000..bfd28a47 --- /dev/null +++ b/adventure/games/remi.montagut@ynov.com/me.md @@ -0,0 +1,26 @@ +# Rémi Montagut + +# CONSIGNES +* Connaître les commandes de base de PowerShell ou Shell pour un usage quotidien +* Gérer les utilisateurs avec des scripts +* Automatiser l’administration des stations de travail et des serveurs +* Ecrire des scripts sous Windows avec PowerShell +* Savoir programmer et debugger un shellscript + +Expériences +-- +Alternance en tant qu'ingénieur devops, SHELL, Jenkis, Ansible + +OS +-- +Mac OS ( ARM ) / Proxmox à disposition pour virtualiser + + + +Votre machine ou celle de votre boite ? + +la mienne + +Activité de votre alternance ? + +ingénieur devops diff --git a/kubo_v0.20.0_linux.install.sh b/install.kubo_v0.20.0_linux.sh similarity index 100% rename from kubo_v0.20.0_linux.install.sh rename to install.kubo_v0.20.0_linux.sh diff --git a/install.sh b/install.sh index a913aea5..b1bb1292 100755 --- a/install.sh +++ b/install.sh @@ -20,9 +20,9 @@ start=`date +%s` ################################################################### IPFS ######################################################################## [[ ! $(which ipfs) ]] \ -&& echo "bash <(wget -qO- https://git.p2p.legal/qo-op/Astroport.ONE/raw/branch/master/kubo_v0.20.0_linux.install.sh)" \ +&& echo "bash <(wget -qO- https://git.p2p.legal/qo-op/Astroport.ONE/raw/branch/master/install.kubo_v0.20.0_linux.sh)" \ && architecture=$(uname -m) && [[ $architecture == "x86_64" || $architecture == "aarch64" || "$architecture" == "armv7l" ]] \ -&& bash <(wget -qO- https://raw.githubusercontent.com/papiche/Astroport.ONE/master/kubo_v0.20.0_linux.install.sh) \ +&& bash <(wget -qO- https://raw.githubusercontent.com/papiche/Astroport.ONE/master/install.kubo_v0.20.0_linux.sh) \ || echo "=== IPFS FOUND === OK" [[ ! $(which ipfs) ]] && echo "INSTALL IPFS PLEASE" && exit 1 @@ -44,7 +44,7 @@ echo "#############################################" echo "######### INSTALL BASE & PYTHON3 PACKAGE ####" echo "#############################################" -for i in git make cmake docker-compose fail2ban npm shellcheck netcat-traditional ncdu chromium miller inotify-tools curl net-tools libsodium* libcurl4-openssl-dev python3-pip python3-setuptools python3-wheel python3-dotenv python3-gpg python3-jwcrypto python3-brotli python3-aiohttp mpack; do +for i in git make cmake docker-compose fail2ban npm shellcheck socat netcat-traditional ncdu chromium miller inotify-tools curl net-tools libsodium* libcurl4-openssl-dev python3-pip python3-setuptools python3-wheel python3-dotenv python3-gpg python3-jwcrypto python3-brotli python3-aiohttp mpack; do if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then echo ">>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Installation $i <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" sudo apt install -y $i diff --git a/templates/P4N/all.min.css b/templates/P4N/all.min.css new file mode 100644 index 00000000..e1e271c0 --- /dev/null +++ b/templates/P4N/all.min.css @@ -0,0 +1,5 @@ +/*! + * Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1);transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-bacon:before{content:"\f7e5"}.fa-bacteria:before{content:"\e059"}.fa-bacterium:before{content:"\e05a"}.fa-bahai:before{content:"\f666"}.fa-balance-scale:before{content:"\f24e"}.fa-balance-scale-left:before{content:"\f515"}.fa-balance-scale-right:before{content:"\f516"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-battle-net:before{content:"\f835"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-biking:before{content:"\f84a"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-medical:before{content:"\f7e6"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bootstrap:before{content:"\f836"}.fa-border-all:before{content:"\f84c"}.fa-border-none:before{content:"\f850"}.fa-border-style:before{content:"\f853"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-box-tissue:before{content:"\e05b"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-bread-slice:before{content:"\f7ec"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-buffer:before{content:"\f837"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buy-n-large:before{content:"\f8a6"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caravan:before{content:"\f8ff"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-cheese:before{content:"\f7ef"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-chromecast:before{content:"\f838"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clinic-medical:before{content:"\f7f2"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudflare:before{content:"\e07d"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-medical:before{content:"\f7f5"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-alt:before{content:"\f422"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-cotton-bureau:before{content:"\f89e"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-crutch:before{content:"\f7f7"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dailymotion:before{content:"\e052"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-deezer:before{content:"\e077"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-disease:before{content:"\f7fa"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edge-legacy:before{content:"\e078"}.fa-edit:before{content:"\f044"}.fa-egg:before{content:"\f7fb"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-evernote:before{content:"\f839"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-alt:before{content:"\f424"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fan:before{content:"\f863"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-faucet:before{content:"\e005"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-firefox-browser:before{content:"\e007"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-alt:before{content:"\f841"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-pay:before{content:"\e079"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guilded:before{content:"\e07e"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hamburger:before{content:"\f805"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-medical:before{content:"\e05c"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-holding-water:before{content:"\f4c1"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-middle-finger:before{content:"\f806"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-sparkles:before{content:"\e05d"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-hands-wash:before{content:"\e05e"}.fa-handshake:before{content:"\f2b5"}.fa-handshake-alt-slash:before{content:"\e05f"}.fa-handshake-slash:before{content:"\e060"}.fa-hanukiah:before{content:"\f6e6"}.fa-hard-hat:before{content:"\f807"}.fa-hashtag:before{content:"\f292"}.fa-hat-cowboy:before{content:"\f8c0"}.fa-hat-cowboy-side:before{content:"\f8c1"}.fa-hat-wizard:before{content:"\f6e8"}.fa-hdd:before{content:"\f0a0"}.fa-head-side-cough:before{content:"\e061"}.fa-head-side-cough-slash:before{content:"\e062"}.fa-head-side-mask:before{content:"\e063"}.fa-head-side-virus:before{content:"\e064"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hive:before{content:"\e07f"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hospital-user:before{content:"\f80d"}.fa-hot-tub:before{content:"\f593"}.fa-hotdog:before{content:"\f80f"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-house-user:before{content:"\e065"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-ice-cream:before{content:"\f810"}.fa-icicles:before{content:"\f7ad"}.fa-icons:before{content:"\f86d"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-ideal:before{content:"\e013"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-innosoft:before{content:"\e080"}.fa-instagram:before{content:"\f16d"}.fa-instagram-square:before{content:"\e055"}.fa-instalod:before{content:"\e081"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itch-io:before{content:"\f83a"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laptop-house:before{content:"\e066"}.fa-laptop-medical:before{content:"\f812"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lungs:before{content:"\f604"}.fa-lungs-virus:before{content:"\e067"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-mdb:before{content:"\f8ca"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microblog:before{content:"\e01a"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mixer:before{content:"\e056"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse:before{content:"\f8cc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-octopus-deploy:before{content:"\e082"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-orcid:before{content:"\f8d2"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-pager:before{content:"\f815"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-arrows:before{content:"\e068"}.fa-people-carry:before{content:"\f4ce"}.fa-pepper-hot:before{content:"\f816"}.fa-perbyte:before{content:"\e083"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-alt:before{content:"\f879"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-square-alt:before{content:"\f87b"}.fa-phone-volume:before{content:"\f2a0"}.fa-photo-video:before{content:"\f87c"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-square:before{content:"\e01e"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-pizza-slice:before{content:"\f818"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-plane-slash:before{content:"\e069"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pump-medical:before{content:"\e06a"}.fa-pump-soap:before{content:"\e06b"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-record-vinyl:before{content:"\f8d9"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-remove-format:before{content:"\f87d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-rust:before{content:"\e07a"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-salesforce:before{content:"\f83b"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-shield-virus:before{content:"\e06c"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopify:before{content:"\e057"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sink:before{content:"\e06d"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-soap:before{content:"\e06e"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-down-alt:before{content:"\f881"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-alpha-up-alt:before{content:"\f882"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-down-alt:before{content:"\f884"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-amount-up-alt:before{content:"\f885"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-down-alt:before{content:"\f886"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-numeric-up-alt:before{content:"\f887"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-speaker-deck:before{content:"\f83c"}.fa-spell-check:before{content:"\f891"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stackpath:before{content:"\f842"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-stopwatch-20:before{content:"\e06f"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-store-alt-slash:before{content:"\e070"}.fa-store-slash:before{content:"\e071"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swift:before{content:"\f8e1"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-symfony:before{content:"\f83d"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-tiktok:before{content:"\e07b"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toilet-paper-slash:before{content:"\e072"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-trailer:before{content:"\e041"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-trash-restore:before{content:"\f829"}.fa-trash-restore-alt:before{content:"\f82a"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbraco:before{content:"\f8e8"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-uncharted:before{content:"\e084"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-unity:before{content:"\e049"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-unsplash:before{content:"\e07c"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-nurse:before{content:"\f82f"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-users-slash:before{content:"\e073"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-vest:before{content:"\e085"}.fa-vest-patches:before{content:"\e086"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-virus:before{content:"\e074"}.fa-virus-slash:before{content:"\e075"}.fa-viruses:before{content:"\e076"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-voicemail:before{content:"\f897"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-watchman-monitoring:before{content:"\e087"}.fa-water:before{content:"\f773"}.fa-wave-square:before{content:"\f83e"}.fa-waze:before{content:"\f83f"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wodu:before{content:"\e088"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yammer:before{content:"\f840"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.fab,.far{font-weight:400}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900} \ No newline at end of file diff --git a/templates/P4N/favicon.ico b/templates/P4N/favicon.ico new file mode 100644 index 00000000..7427a537 Binary files /dev/null and b/templates/P4N/favicon.ico differ diff --git a/templates/P4N/images/marker-icon-2x.png b/templates/P4N/images/marker-icon-2x.png index a10a97da..addc1b54 100644 Binary files a/templates/P4N/images/marker-icon-2x.png and b/templates/P4N/images/marker-icon-2x.png differ diff --git a/templates/P4N/images/marker-icon.png b/templates/P4N/images/marker-icon.png index a10a97da..bb1ad8cd 100644 Binary files a/templates/P4N/images/marker-icon.png and b/templates/P4N/images/marker-icon.png differ diff --git a/templates/P4N/images/marker-shadow.png b/templates/P4N/images/marker-shadow.png index 88628c02..fe11be59 100644 Binary files a/templates/P4N/images/marker-shadow.png and b/templates/P4N/images/marker-shadow.png differ diff --git a/templates/P4N/images/markers-shadow.png b/templates/P4N/images/markers-shadow.png new file mode 100644 index 00000000..92fb340d Binary files /dev/null and b/templates/P4N/images/markers-shadow.png differ diff --git a/templates/P4N/images/markers-soft.png b/templates/P4N/images/markers-soft.png new file mode 100644 index 00000000..7fc6479d Binary files /dev/null and b/templates/P4N/images/markers-soft.png differ diff --git a/templates/P4N/index.html b/templates/P4N/index.html index 7b4cc342..37f7d9fb 100644 --- a/templates/P4N/index.html +++ b/templates/P4N/index.html @@ -3,8 +3,12 @@ + + UPlanet _UMAP_ _SERVICE_ Data - + + +
- - - + + + + + + + -

-
MENU +

+
+ CONSOLE +       
+ + + - - diff --git a/tools/IPFSNODEID.weather.sh b/tools/IPFSNODEID.weather.sh new file mode 100755 index 00000000..49b0fffd --- /dev/null +++ b/tools/IPFSNODEID.weather.sh @@ -0,0 +1,66 @@ +#!/bin/bash +######################################################################## +# Version: 0.1 +# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) +######################################################################## +## EXPLORE SWARM MAPNS +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +ME="${0##*/}" + +. "$MY_PATH/../tools/my.sh" + +# Mapping of weather conditions to emoticons +weather_emoticon_map=( + ["Clear"]="😊" + ["Clouds"]="☁️" + ["Rain"]="🌧️" + ["Snow"]="❄️" + ["Thunderstorm"]="⛈️" + # Add more mappings as needed +) + +default_emoticon="😊" + +## GET IPFSNODEID WHEATER +source ~/.zen/GPS +echo "... ~/.zen/GPS ... $LAT $LON ..." + +## caching IPCity +[[ ! -s ~/.zen/IPCity ]] \ + && my_IPCity > ~/.zen/IPCity +ville=$(cat ~/.zen/IPCity) + +api_key="ac5e65a2fd10d3788d40cdae0d4516ba" # Remplacez YOUR_API_KEY par votre clé API OpenWeatherMap +url="http://api.openweathermap.org/data/2.5/weather?q=$ville&APPID=$api_key&units=metric" +meteo=$(curl -s $url) + +# Extract relevant weather information +condition=$(echo "$meteo" | jq -r '.weather[0].main') +emoticon=${weather_emoticon_map[$condition]} +selected_emoticon=${emoticon:-$default_emoticon} + +description=$(echo "$meteo" | jq -r '.weather[0].description') +temp=$(echo "$meteo" | jq -r '.main.temp') +humidity=$(echo "$meteo" | jq -r '.main.humidity') +wind_speed=$(echo "$meteo" | jq -r '.wind.speed') + +# Create a sentence with "emoticons" and ASCII art decorations +echo "# $ville + +## $selected_emoticon $condition +$description + +--- + +T=${temp} °C +H=${humidity} % +W=${wind_speed} m/s + +--- + +😊 Stay cozy BRO ! +" + +## SATELLITE IMAGE ... +## Add more +++ diff --git a/tools/MOATS2seconds.sh b/tools/MOATS2seconds.sh index 51d5affa..2938b5fc 100755 --- a/tools/MOATS2seconds.sh +++ b/tools/MOATS2seconds.sh @@ -28,7 +28,7 @@ MINUTE=${Zmoats:10:2} MINUTE=${MINUTE#0} SECMINUTE=$((MINUTE * 60)) -SECOND=$((${Zmoats:12:2}+0)) +SECOND=${Zmoats:12:2} # Calculate the time difference in seconds diff --git a/tools/PAY4SURE.sh b/tools/PAY4SURE.sh index 25a4074c..f3b1ae10 100755 --- a/tools/PAY4SURE.sh +++ b/tools/PAY4SURE.sh @@ -11,8 +11,8 @@ ME="${0##*/}" . "${MY_PATH}/my.sh" -## REDIRECT OUTPUT TO "pay4sure.log" -exec 2>&1 >> ~/.zen/tmp/pay4sure.log +## REDIRECT OUTPUT TO "/tmp/20h12.log" +exec 2>&1 >> /tmp/20h12.log KEYFILE="$1" AMOUNT="$2" @@ -29,24 +29,29 @@ COMMENT=${COMMENT}" && MOATS=$(date -u +"%Y%m%d%H%M%S%4N") \ || echo "OLD PAYMENT FAILURE = NEW TRY $MOATS" -## CHECKING PAYOUT WALLET (dunikey file) +## CHECKING ISSUER WALLET (dunikey file) [[ -s ${KEYFILE} ]] \ && ISSUERPUB=$(cat ${KEYFILE} | grep "pub:" | cut -d ' ' -f 2) \ - || { echo "ERROR : MISSING SECRET DUNIKEY FILE" && exit 1; } + || { echo "ERROR : MISSING SECRET DUNIKEY FILE - EXIT -" && exit 1; } + +[[ -z ${ISSUERPUB} ]] && echo "CANNOT EXTRACT ISSUERPUB FROM DUNIKEY - EXIT -" && exit 1 COINS=$($MY_PATH/COINScheck.sh ${ISSUERPUB} | tail -n 1) -[[ -z $COINS ]] && echo "ERROR : ${ISSUERPUB}=$COINS EMPTY WALLET" && exit 1 +[[ -z $COINS ]] && echo "ERROR : ${ISSUERPUB}=$COINS EMPTY WALLET - EXIT -" && exit 1 + ###### TEST INPUT VALUES [[ $AMOUNT == "ALL" ]] && AMOUNT=$COINS ## ALL MEAN EMPTY ORIGIN WALLET -[[ -z $AMOUNT ]] && echo "ERROR : ${ISSUERPUB}=$COINS MISSING AMOUNT" && exit 1 -[[ $AMOUNT =~ ^[0-9]+([.][0-9]+)?$ ]] && echo "Valid AMOUNT=${AMOUNT}" || { echo "ERROR NOT a valid AMOUNT : ${AMOUNT}" && exit 1; } -[[ $(echo "$COINS <= $AMOUNT" | bc -l) -eq 1 ]] && echo "ERROR : SOURCE WALLET IS MISSING COINS !!! $AMOUNT > $COINS" && exit 1 -[[ -z $G1PUB ]] && echo "ERROR : ${ISSUERPUB}=$COINS ($AMOUNT) MISSING DESTINATION" && exit 1 +[[ -z $AMOUNT ]] && echo "ERROR : ${ISSUERPUB}=$COINS MISSING AMOUNT - EXIT -" && exit 1 +[[ $AMOUNT =~ ^[0-9]+([.][0-9]+)?$ ]] \ + && echo "Valid AMOUNT=${AMOUNT}" \ + || { echo "ERROR NOT a valid AMOUNT : ${AMOUNT} - EXIT -" && exit 1; } +[[ $(echo "$COINS < $AMOUNT" | bc -l) -eq 1 ]] \ + && echo "ERROR : SOURCE WALLET IS MISSING COINS !!! $AMOUNT > $COINS - EXIT -" && exit 1 +[[ -z $G1PUB ]] && echo "ERROR : ${ISSUERPUB}=$COINS ($AMOUNT) MISSING DESTINATION - EXIT -" && exit 1 +echo echo "PAYMENT PROCESSOR ID ${MOATS}" -echo "KEYFILE: $HOME/.zen/game/pending/${ISSUERPUB}/" echo "${ISSUERPUB} : (${AMOUNT}) -> ${G1PUB}" -echo "COMMENT : ${COMMENT}" [[ -z $COMMENT ]] && COMMENT="ZEN:${MOATS}" @@ -68,6 +73,7 @@ rm -f ${PENDINGDIR}/${MOATS}.result.html ################################################ # MAKE PAYMENT +echo ${MY_PATH}/jaklis/jaklis.py -k ${PENDINGDIR}/${MOATS}.key pay -a ${AMOUNT} -p ${G1PUB} -c "${COMMENT}" -m 2>&1> ${PENDINGDIR}/${MOATS}.result.html CHK1=$(cat ${PENDINGDIR}/${MOATS}.result.html | head -n 1 ) CHK2=$(cat ${PENDINGDIR}/${MOATS}.result.html | head -n 2 ) @@ -97,14 +103,16 @@ if [[ $? == 0 || $(echo "${CHK2}" | grep 'succès') || $(echo "${CHK1}" | grep ZENDES=$(echo "$DES * 10" | bc | cut -d '.' -f 1) ##### MONITORING ######### - echo "

ZEN OPERATION

-

${ISSUERPUB} -
${ZENCUR} - ${ZENAMOUNT}

-

${G1PUB} -
${ZENDES} + ${ZENAMOUNT}

-

OK

" > ${PENDINGDIR}/${MOATS}.result.html + echo "

${ZENAMOUNT} ZEN OPERATION

+ ${COMMENT} +

${ISSUERPUB} + (SCAN) +
//--->> ${G1PUB} + (SCAN) +

+ " > ${PENDINGDIR}/${MOATS}.result.html - $MY_PATH/mailjet.sh "support@qo-op.com" ${PENDINGDIR}/${MOATS}.result.html "${ZENAMOUNT} ZEN : ${ISSUERPUB} > ${G1PUB}" + $MY_PATH/mailjet.sh "support@qo-op.com" ${PENDINGDIR}/${MOATS}.result.html "${ZENAMOUNT} ZEN ${ISSUERPUB}//${COMMENT} TO ${G1PUB}" ## REMOVE IF YOU WANT TO MONITOR "SENT" WINDOW INCERTITUDE rm ${PENDINGDIR}/${MOATS}.key diff --git a/tools/RSS2WEEKnewsfile.sh b/tools/RSS2WEEKnewsfile.sh index 1b1b93cc..8f09621d 100755 --- a/tools/RSS2WEEKnewsfile.sh +++ b/tools/RSS2WEEKnewsfile.sh @@ -18,9 +18,9 @@ RSS=$1 ## filepath to RSS week file to extract Tiddlers #~ echo "======= RSS 2 WEEKnewsfile ======= #~ Analysing ${RSS} #~ ==================================================================" -cat ${RSS} | jq -r '.[] | if .ipfs then "\n# [\(."title")](\(."ipfs"))\n\n\(.tags)\n \(.duree)" +cat ${RSS} | jq -r '.[] | select(.title | startswith("$:/") | not) | if .ipfs then "\n# [\(."title")](\(."ipfs"))\n\n\(.tags)\n \(.duree)" elif .ipfs_one then "\n# \(."title")\n\n\(.tags)\n\(.desc)\n\(.g1pub)" elif ._external_url then "\n# [\(."title")](\(._external_url))\n\n\(.tags)\n\(.mime) \(.type)" - else "\n# \(."title")\n\n\(.tags)\n\(.text)" end' + else "\n# \(."title")\n\n\(.tags)\n\(.text)" end | select(.tags | contains(["$:/isEmbedded", "$:/isIpfs"]) | not)' exit 0 diff --git a/tools/ipfs_config.sh b/tools/ipfs_config.sh index 33d1523b..1e304b64 100755 --- a/tools/ipfs_config.sh +++ b/tools/ipfs_config.sh @@ -40,8 +40,8 @@ ipfs config --json Experimental.P2pHttpProxy true ipfs config --json Swarm.ConnMgr.LowWater 20 ipfs config --json Swarm.ConnMgr.HighWater 40 -[[ ! $isLAN ]] && ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://'$myIP':8080", "http://ipfs.localhost:8080", "http://127.0.0.1:8080", "http://127.0.1.1:8080", "https://ipfs.'$(hostname)'.copylaradio.com", "https://ipfs.copylaradio.com" ]' \ - || ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://'$myIP':8080", "http://'$(hostname)'.local:8080","http://'$(hostname)':8080", "http://127.0.0.1:8080", "http://ipfs.localhost:8080", "http://127.0.1.1:8080" ]' +[[ ! $isLAN ]] && ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://'$myIP':8080", "http://'$(hostname)'.localhost:8080", "http://ipfs.localhost:8080", "http://127.0.0.1:8080", "http://127.0.1.1:8080", "https://ipfs.'$(hostname)'.copylaradio.com", "https://ipfs.copylaradio.com" ]' \ + || ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://'$myIP':8080", "http://'$(hostname)'.local:8080","http://'$(hostname)':8080", "http://'$(hostname)'.localhost:8080", "http://127.0.0.1:8080", "http://ipfs.localhost:8080", "http://127.0.1.1:8080" ]' ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]' ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]' diff --git a/tools/mailjet.sh b/tools/mailjet.sh index 993d841b..b86f6e01 100755 --- a/tools/mailjet.sh +++ b/tools/mailjet.sh @@ -10,6 +10,9 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized . "$MY_PATH/my.sh" ME="${0##*/}" +## LOG OUTPUT +exec 2>&1 >> ~/.zen/tmp/mailjet.log + echo ' ######################################################################## # \\/// diff --git a/tools/make_image_ipfs_index_carousel.sh b/tools/make_image_ipfs_index_carousel.sh index ed81ac9d..c91b76d1 100755 --- a/tools/make_image_ipfs_index_carousel.sh +++ b/tools/make_image_ipfs_index_carousel.sh @@ -223,6 +223,6 @@ htmlipfs=$(ipfs add -q $html_file) [[ $XDG_SESSION_TYPE == 'x11' || $XDG_SESSION_TYPE == 'wayland' ]] && xdg-open http://ipfs.localhost:8080/ipfs/$htmlipfs echo "/ipfs/$htmlipfs" > ~/.zen/tmp/ISTATION -cat ~/.zen/tmp/ISTATION +cat ~/.zen/tmp/ISTATION ### KEEPIT ON LAST LINE exit 0 diff --git a/tools/my.sh b/tools/my.sh index e5496f61..f33b8545 100755 --- a/tools/my.sh +++ b/tools/my.sh @@ -428,6 +428,37 @@ function makecoord() { echo "${input}" } +# Fonction pour récupérer la météo depuis l'API OpenWeatherMap +recuperer_meteo() { + echo "En train de récupérer les données météo..." + # Récupérer la météo à l'aide de l'API OpenWeatherMap + ville="Paris" # Vous pouvez modifier la ville ici + api_key="310103dee4a9d1b716ee27d79f162c7e" # Remplacez YOUR_API_KEY par votre clé API OpenWeatherMap + url="http://api.openweathermap.org/data/2.5/weather?q=$ville&appid=$api_key&units=metric" + meteo=$(curl -s $url) + # Extraire les informations pertinentes de la réponse JSON + temperature=$(echo $meteo | jq -r '.main.temp') + description=$(echo $meteo | jq -r '.weather[0].description') + echo "La météo à $ville : $description, Température: $temperature °C" +} + +# my_IPCity # Fonction pour récupérer la géolocalisation à partir de l'adresse IP +my_IPCity() { + local ip=$1 + + if [ -z "$ip" ]; then + ip=$(curl 'https://api.ipify.org?format=json' --silent | jq -r '.ip') + fi + + local url="http://ip-api.com/json/$ip" + local geolocalisation=$(curl -s "$url") + + local ville=$(echo "$geolocalisation" | jq -r '.city') + local pays=$(echo "$geolocalisation" | jq -r '.country') + + echo "$ville,$pays" +} + IPFSNODEID="$(myIpfsPeerId)" [[ ! $MOATS ]] && MOATS="$(myDate)" isLAN="$(isLan)" @@ -440,16 +471,16 @@ isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|( myDOMAIN="copylaradio.com" myASTROPORTW="http://$(hostname).local:1234" #astroport.localhost -myASTROPORT="http://${myIP}:1234" # BE ACCESSIBLE THROUGH LAN -myAPI="http://${myIP}:5001" +myASTROPORT="http://127.0.0.1:1234" # BE ACCESSIBLE THROUGH LAN +myAPI="http://127.0.0.1:5001" myDATA="https://data.gchange.fr" myGCHANGE="https://www.gchange.fr" myCESIUM="https://g1.data.e-is.pro" -myG1BILLET="http://${myIP}:33101" +myG1BILLET="http://127.0.0.1:33101" myHOST="$(myHostName)" myIPFSW="http://$(hostname).local:8080" ## ipfs.localhost (IP works better in LAN deported desktop), but not in docker. -myIPFS="http://${myIP}:8080" ## ipfs.localhost (IP works better in LAN deported desktop), but not in docker. +myIPFS="http://127.0.0.1:8080" ## ipfs.localhost (IP works better in LAN deported desktop), but not in docker. myIPFSGW="$(myIpfsGw)" myTUBE="$(myTube)" myASTROTUBE="https://$(myAstroTube)" @@ -488,7 +519,7 @@ if [[ $XDG_SESSION_TYPE == 'x11' || $XDG_SESSION_TYPE == 'wayland' ]]; then fi ## https://git.p2p.legal/qo-op/OSM2IPFS -EARTHCID="/ipfs/QmYGS24WxVbsmmQfqWohXhXQZiwSmNswhTtSj9msVWKkNh" +EARTHCID="/ipfs/QmXWDm78ne22ou9kmRPFqVa3e15BNHsXBZe4Y9KmgBPmJL" FLIPPERCID="${EARTHCID}/coinflip" ### EASTER EGG ########################### diff --git a/tools/search_for_this_email_in_players.sh b/tools/search_for_this_email_in_players.sh index be45c522..aab5f196 100755 --- a/tools/search_for_this_email_in_players.sh +++ b/tools/search_for_this_email_in_players.sh @@ -19,16 +19,17 @@ EMAIL="$1" if [[ "${EMAIL}" =~ ^[a-zA-Z0-9.%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$ ]]; then - INDEX=$(ls $HOME/.zen/game/players/${EMAIL}/ipfs/moa/index.html 2>/dev/null) ## LOCAL - [[ ! $INDEX ]] && INDEX=$(ls $HOME/.zen/tmp/${IPFSNODEID}/TW/${EMAIL}/index.html 2>/dev/null) ## CACHE - [[ ! $INDEX ]] && INDEX=$(ls $HOME/.zen/tmp/swarm/*/TW/${EMAIL}/index.html 2>/dev/null) ## SWARM + INDEX=$(ls $HOME/.zen/game/players/${EMAIL}/ipfs/moa/index.html 2>/dev/null) && source="LOCAL" + [[ ! $INDEX ]] && INDEX=$(ls $HOME/.zen/tmp/${IPFSNODEID}/TW/${EMAIL}/index.html 2>/dev/null) && source="CACHE" + [[ ! $INDEX ]] && INDEX=$(ls $HOME/.zen/tmp/swarm/*/TW/${EMAIL}/index.html 2>/dev/null) && source="SWARM" [[ ! $INDEX ]] && exit 1 ## TODO ? SEARCH WITH DNSLINK - echo "export TW=${INDEX}" + echo "export TW=${INDEX} source=${source}" # SWARM CACHE index.html contains - # - EXTERNAL=$(grep -o "url='/[^']*'" ${INDEX} | sed "s/url='\(.*\)'/\1/" | awk -F"/" '{print $3}') + # + [[ ${source} != "LOCAL" ]] \ + && EXTERNAL=$(grep -o "url='/[^']*'" ${INDEX} | sed "s/url='\(.*\)'/\1/" | awk -F"/" '{print $3}') if [[ ! ${EXTERNAL} ]]; then ## EXTRACT DATA FROM TW @@ -39,13 +40,15 @@ if [[ "${EMAIL}" =~ ^[a-zA-Z0-9.%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$ ]]; then ASTROPORT=$(cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r .[].astroport) ASTROG1=$(cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r .[].g1pub) + TWCHAIN=$(cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r .[].chain) ## GET ASTRONAUTENS - field was missing in TW model Astroport Tiddler - ASTRONAUTENS=$(cat ~/.zen/tmp/${MOATS}/Astroport.json | jq -r .[].astronautens) [[ ${ASTRONAUTENS} == "null" || ${ASTRONAUTENS} == "" ]] && ASTRONAUTENS="/ipns/"$(ipfs key list -l | grep -w ${ASTROG1} | cut -d ' ' -f1) - [[ ${ASTRONAUTENS} == "/ipns/" ]] && ASTRONAUTENS="" + [[ ${ASTRONAUTENS} == "/ipns/" ]] && ASTRONAUTENS="/ipfs/${TWCHAIN}" else - ASTRONAUTENS="/ipns/${EXTERNAL}" + ASTRONAUTENS="/ipfs/${EXTERNAL}" + ASTROPORT="/ipns/$(echo $INDEX | rev | cut -d / -f 4 | rev)" fi rm -Rf ~/.zen/tmp/${MOATS}