From 8e80803b273e4fcc6bbe00bc71425558fcf51e29 Mon Sep 17 00:00:00 2001 From: qo-op Date: Sun, 3 May 2020 02:17:09 +0200 Subject: [PATCH] gchange --- zen/cron_GCHANGE.sh | 53 --------------------------------------------- zen/zen_MAKE.sh | 4 ++-- 2 files changed, 2 insertions(+), 55 deletions(-) delete mode 100755 zen/cron_GCHANGE.sh diff --git a/zen/cron_GCHANGE.sh b/zen/cron_GCHANGE.sh deleted file mode 100755 index 428cb3d..0000000 --- a/zen/cron_GCHANGE.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -################################################################################ -# Author: Fred (support@qo-op.com) -# Version: 0.1 -# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) -################################################################################ -# TODO: SMS/SSB Alert when any gchange.fr ads is close to geopoint -# -# Extract last ads -# TODO Search ES with distance !!!! contact @kimamila or http://www.elasticsearchtutorial.com/spatial-search-tutorial.html - -ipfsnodeid=$(ipfs id -f='\n') -[[ ! -f ~/.ssb/secret.dunikey ]] && $MY_PATH/tools/secret2dunikey.sh -g1pub=$(cat ~/.ssb/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) - -CESIUM="https://g1.data.le-sou.org" - -curl -sk ${CESIUM}/user/profile/${g1pub} -o /tmp/profile.json -LON=$(cat /tmp/profile.json | jq '._source.geoPoint.lon') -LAT=$(cat /tmp/profile.json | jq '._source.geoPoint.lat') - -if [[ "$LON" != "null" ]]; then -curl -sk -XPOST 'https://data.gchange.fr/market/record/_search?pretty&_source=title' -d ' - { - "size": 100, - "query": { - "bool": { - "filter": [{ - "geo_distance": { - "distance": "100km", - "geoPoint": { - "lat": '$LAT', - "lon": '$LON' - } - } - }] - } - } - }' | jq -else - echo "Aucune coordonnées geoPoint pour $g1pub" && exit 1 -fi - -TOTAL=$(curl -s https://data.gchange.fr/market/record/_search | jq .hits.total) -echo "TOTAL ANNONCES GCHANGE: $TOTAL" -chunk=0 -while [[ $chunk -lt $TOTAL ]]; do - for res in $(curl -s https://data.gchange.fr/market/record/_search?from=$chunk | jq .hits.hits[]._id | sed s/\"//g ) do; - echo $res; - # curl -s --create-dirs -o ./gchange/$ID.json -s https://data.gchange.fr/market/record/$ID?_source=category,title,description,issuer,time,creationTime,location,address,city,price,unit,currency,thumbnail._content_type,picturesCount,type,stock,fees,feesCurrency,geoPoint - done - chunk=$((chunk+10)) -done diff --git a/zen/zen_MAKE.sh b/zen/zen_MAKE.sh index 1cbf8bc..55c5ff8 100755 --- a/zen/zen_MAKE.sh +++ b/zen/zen_MAKE.sh @@ -406,9 +406,9 @@ if [[ "${PASSENGERNAME}" != "" ]]; then --- **ZEN=$ZEN($READ/$PARK)** -[:flying_saucer:Zen:heart:CONTRACT(s):file_folder:](http://127.0.0.1:8080/ipns/${J}) +[:flying_saucer:Zen:heart:CONTRACT(s)_HERE:file_folder:](http://127.0.0.1:8080/ipns/${J}) -[:sunglasses:**BLOB**:pager:](http://127.0.0.1:8080/ipns/$ipfsnodeid/.$ipfsnodeid/TAG/${ZENSOURCE}) +[:sunglasses:**ZenTAG**:pager:](http://127.0.0.1:8080/ipns/$ipfsnodeid/.$ipfsnodeid/TAG/${ZENSOURCE}) #zenbot #astroport