better like that
This commit is contained in:
parent
5b39b12ddb
commit
598d508535
|
@ -52,9 +52,15 @@ mkdir -p ~/.zen/ipfs/.$ipfsnodeid/G1SSB
|
||||||
sbotc publish '{"type":"ipfsnodeid","text":"'"$ipfsnodeid"'"}'
|
sbotc publish '{"type":"ipfsnodeid","text":"'"$ipfsnodeid"'"}'
|
||||||
sbotc publish '{"type":"ipfstryme","text":"'"$(ipfs id | jq -r .Addresses[] | tail -n 1)"'"}'
|
sbotc publish '{"type":"ipfstryme","text":"'"$(ipfs id | jq -r .Addresses[] | tail -n 1)"'"}'
|
||||||
|
|
||||||
|
################################
|
||||||
# ADD Cesium+ informations
|
# ADD Cesium+ informations
|
||||||
# GET CESIUM+ geoPoint DATA (TODO install , load balance CesiumPod?)
|
|
||||||
CESIUM="https://g1.data.le-sou.org"
|
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=$(curl -s ${CESIUM}/user/profile/${g1pub} | jq '._source.geoPoint.lat')
|
||||||
[[ $geopointlat != null ]] && sbotc publish '{"type":"cesium_geoPoint.lat","text":"'"$geopointlat"'"}'
|
[[ $geopointlat != null ]] && sbotc publish '{"type":"cesium_geoPoint.lat","text":"'"$geopointlat"'"}'
|
||||||
geopointlon=$(curl -s ${CESIUM}/user/profile/${g1pub} | jq '._source.geoPoint.lon')
|
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
|
# GET Cesium+ Avatar image
|
||||||
curl -s ${CESIUM}/user/profile/${g1pub} | jq '._source.avatar._content' | sed 's/\"//g' | base64 -d > "/tmp/avatar.png"
|
curl -s ${CESIUM}/user/profile/${g1pub} | jq '._source.avatar._content' | sed 's/\"//g' | base64 -d > "/tmp/avatar.png"
|
||||||
|
|
||||||
|
|
||||||
## PUBLISH ABOUT MESSAGE
|
## PUBLISH ABOUT MESSAGE
|
||||||
##############################################
|
##############################################
|
||||||
# IF AVATAR not png take IMAGE of G1 wallet QRCode
|
# 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/avatar.png" | grep 'PNG') ]]; then
|
||||||
qrcodefile=~/.zen/ipfs/.$ipfsnodeid/G1SSB/_g1.qrcode.png
|
qrcodefile=~/.zen/ipfs/.$ipfsnodeid/G1SSB/_g1.qrcode.png
|
||||||
qrencode -s 5 -o $qrcodefile "$g1pub"
|
|
||||||
else
|
else
|
||||||
qrcodefile=/tmp/avatar.png
|
qrcodefile=/tmp/avatar.png
|
||||||
fi
|
fi
|
||||||
|
@ -88,7 +94,7 @@ $ssbpub
|
||||||
|
|
||||||
-- sbot publish --
|
-- 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 "
|
echo "
|
||||||
_ _
|
_ _
|
||||||
|
@ -101,7 +107,8 @@ $g1pub
|
||||||
|
|
||||||
-- sbotc publish --
|
-- 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 "
|
echo "
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue