better like that

This commit is contained in:
qo-op 2020-04-28 04:30:29 +02:00
parent 5b39b12ddb
commit 598d508535
1 changed files with 12 additions and 5 deletions

View File

@ -52,9 +52,15 @@ mkdir -p ~/.zen/ipfs/.$ipfsnodeid/G1SSB
sbotc publish '{"type":"ipfsnodeid","text":"'"$ipfsnodeid"'"}'
sbotc publish '{"type":"ipfstryme","text":"'"$(ipfs id | jq -r .Addresses[] | tail -n 1)"'"}'
################################
# ADD Cesium+ informations
# GET CESIUM+ geoPoint DATA (TODO install , load balance CesiumPod?)
CESIUM="https://g1.data.le-sou.org"
title=$(curl -s ${CESIUM}/user/profile/${g1pub} | jq '._source.title')
[[ $title == null ]] && title="Station $USER@$(cat /etc/hostname)"
city=$(curl -s ${CESIUM}/user/profile/${g1pub} | jq '._source.city')
[[ $city != null ]] && title="$title in $city"
geopointlat=$(curl -s ${CESIUM}/user/profile/${g1pub} | jq '._source.geoPoint.lat')
[[ $geopointlat != null ]] && sbotc publish '{"type":"cesium_geoPoint.lat","text":"'"$geopointlat"'"}'
geopointlon=$(curl -s ${CESIUM}/user/profile/${g1pub} | jq '._source.geoPoint.lon')
@ -63,13 +69,13 @@ geopointlon=$(curl -s ${CESIUM}/user/profile/${g1pub} | jq '._source.geoPoint.lo
# GET Cesium+ Avatar image
curl -s ${CESIUM}/user/profile/${g1pub} | jq '._source.avatar._content' | sed 's/\"//g' | base64 -d > "/tmp/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
qrcodefile=~/.zen/ipfs/.$ipfsnodeid/G1SSB/_g1.qrcode.png
qrencode -s 5 -o $qrcodefile "$g1pub"
else
qrcodefile=/tmp/avatar.png
fi
@ -88,7 +94,7 @@ $ssbpub
-- sbot publish --
"
sbot publish --type about --about $ssbpub --description "[Astroport Node](https://astroport.com) [$ipfsnodeid](http://localhost:8080/ipns/$ipfsnodeid) - Wallet $g1pub - Use your KEY ~/.ssb/secret.dunikey in [Cesium](https://cesium.app)" --name "Station $USER@$(cat /etc/hostname)" --image "$id"
sbot publish --type about --about $ssbpub --description "[Astroport Node](https://astroport.com) [$ipfsnodeid](http://localhost:8080/ipns/$ipfsnodeid) - Wallet $g1pub - Use your KEY ~/.ssb/secret.dunikey in [Cesium](https://cesium.app)" --name "$title" --image "$id"
echo "
_ _
@ -101,7 +107,8 @@ $g1pub
-- sbotc publish --
"
[[ ! $(file "/tmp/avatar.png" | grep 'PNG') ]] && sbotc publish '{"type":"post","text":"[G1SSB_Wallet.png]('"$id"')\nUse https://cesium.app to send payment.\nComment your transaction with '"'Zen'"' to create ZenTags...","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}'
[[ ! $(file "/tmp/avatar.png" | grep 'PNG') ]] && sbotc publish '{"type":"post","text":"[My G1 Wallet QRCode]('"$id"')\nUse [Cesium](https://cesium.app) to send payment to it.\nComment your transaction with '"'Zen'"' to create ZenTags...","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}'
echo "