From 586f1affc7db6061493d7e5352f54b89d9e8db3e Mon Sep 17 00:00:00 2001 From: qo-op Date: Mon, 11 May 2020 04:30:10 +0200 Subject: [PATCH] _g1.avatar.png --- zen/ssb_INIT.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/zen/ssb_INIT.sh b/zen/ssb_INIT.sh index e5ffb4e..98a1680 100755 --- a/zen/ssb_INIT.sh +++ b/zen/ssb_INIT.sh @@ -46,7 +46,7 @@ g1pub=$(cat ~/.ssb/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) ######################################################################## # GET NODE disk performance. TODO, publish and use as IPFS repartition -echo "PERFORMANCE TESTING" +echo "DISK PERFORMANCE TESTING" [[ -f ~/.zen/test.disk ]] && rm -f ~/.zen/test.disk diskperf=$(dd if=/dev/zero of=~/.zen/test.disk bs=10M count=1 oflag=dsync 2>&1 | tail -n 1 | sed s/\,/\ -/g | cut -d '-' -f 4) @@ -73,20 +73,21 @@ geopointlon=$(curl -s ${CESIUM}/user/profile/${g1pub} | jq '._source.geoPoint.lo [[ $geopointlon != null ]] && sbotc publish '{"type":"cesium_geoPoint.lon","text":"'"$geopointlon"'"}' # GET Cesium+ Avatar image -curl -s ${CESIUM}/user/profile/${g1pub} | jq -r '._source.avatar._content' | base64 -d > "/tmp/avatar.png" +curl -s ${CESIUM}/user/profile/${g1pub} | jq -r '._source.avatar._content' | base64 -d > "/tmp/_g1.avatar.png" ## PUBLISH ABOUT MESSAGE ############################################## # IF AVATAR not png take IMAGE of G1 wallet QRCode qrencode -s 5 -o ~/.zen/ipfs/.$ipfsnodeid/G1SSB/_g1.qrcode.png "$g1pub" -if [[ ! $(file "/tmp/avatar.png" | grep 'PNG') ]]; then +if [[ ! $(file "/tmp/_g1.avatar.png" | grep 'PNG') ]]; then echo "NO Cesium AVATAR - Using G1Pub QRCode" imagefile=~/.zen/ipfs/.$ipfsnodeid/G1SSB/_g1.qrcode.png - rm -f /tmp/avatar.png + rm -f /tmp/_g1.avatar.png else echo "AVATAR FOUND" - imagefile=/tmp/avatar.png + imagefile=/tmp/_g1.avatar.png + cp /tmp/_g1.avatar.png ~/.zen/ipfs/.$ipfsnodeid/G1SSB/ fi # Prepare QRCode File for SSB @@ -131,7 +132,7 @@ $g1balance -- sbotc publish -- " # IF no AVATAR, publish message with QRCode -if [[ ! $(file "/tmp/avatar.png" | grep 'PNG') ]]; then +if [[ ! $(file "/tmp/_g1.avatar.png" | grep 'PNG') ]]; then sbotc publish '{"type":"post","text":"[My G1 Wallet QRCode]('"$id"')\nI am using [Cesium](https://cesium.app) to manage my wallet with (base64 to base58) secret.dunikey","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}' else sbotc publish '{"type":"post","text":"![Cesium Avatar]('"$id"')\n from my Wallet [Cesium](https://demo.cesium.app/#/app/wot/'"$g1pub"') '"$g1pub"'","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}'