_g1.avatar.png
This commit is contained in:
parent
a62f185a2d
commit
586f1affc7
|
@ -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"'"}]}'
|
||||
|
|
Loading…
Reference in New Issue