debug
This commit is contained in:
parent
f3dee8a47b
commit
29f8b2417d
|
@ -79,16 +79,19 @@ curl -s ${CESIUM}/user/profile/${g1pub} | jq -r '._source.avatar._content' | bas
|
||||||
qrencode -s 5 -o ~/.zen/ipfs/.$ipfsnodeid/G1SSB/_g1.qrcode.png "$g1pub"
|
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
|
echo "NO Cesium AVATAR - Using G1Pub QRCode"
|
||||||
|
imagefile=~/.zen/ipfs/.$ipfsnodeid/G1SSB/_g1.qrcode.png
|
||||||
rm -f /tmp/avatar.png
|
rm -f /tmp/avatar.png
|
||||||
else
|
else
|
||||||
qrcodefile=/tmp/avatar.png
|
echo "AVATAR FOUND"
|
||||||
|
imagefile=/tmp/avatar.png
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare QRCode File for SSB
|
# Prepare QRCode File for SSB
|
||||||
name=${qrcodefile##*/}
|
name=${imagefile##*/}
|
||||||
id="$(sbotc blobs.add < $qrcodefile)"
|
id="$(sbotc blobs.add < $imagefile)"
|
||||||
type="$(file -b --mime-type $qrcodefile)"
|
type="$(file -b --mime-type $imagefile)"
|
||||||
size="$(wc -c < $qrcodefile)"
|
size="$(wc -c < $imagefile)"
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
|
|
||||||
|
@ -96,10 +99,11 @@ echo "
|
||||||
/--\|_)(_)|_||_ : PUBLISH to SSB feed...
|
/--\|_)(_)|_||_ : PUBLISH to SSB feed...
|
||||||
|
|
||||||
$ssbpub
|
$ssbpub
|
||||||
|
image: $id / $type / $size
|
||||||
|
|
||||||
-- sbot publish --
|
|
||||||
"
|
"
|
||||||
# sbot publish --type about --about $ssbpub --description "[Astroport Node](https://astroport.com) [$ipfsnodeid](http://localhost:8080/ipns/$ipfsnodeid) - Wallet $g1pub - $diskperf" --name "$title" --image "$id"
|
# sbot publish --type about --about $ssbpub --description "[Astroport Node](https://astroport.com) [$ipfsnodeid](http://localhost:8080/ipns/$ipfsnodeid) - Wallet $g1pub - $diskperf" --name "$title" --image "$id"
|
||||||
|
echo "sbotc publish \"{\"type\":\"about\",\"about\":\"$ssbpub\",\"description\":\"[Astroport Node](https://astroport.com) [$ipfsnodeid](http://localhost:8080/ipns/$ipfsnodeid) - Wallet $g1pub - $diskperf\",\"name\":\"$title\",\"image\":\"$id\"}\""
|
||||||
sbotc publish "{\"type\":\"about\",\"about\":\"$ssbpub\",\"description\":\"[Astroport Node](https://astroport.com) [$ipfsnodeid](http://localhost:8080/ipns/$ipfsnodeid) - Wallet $g1pub - $diskperf\",\"name\":\"$title\",\"image\":\"$id\"}"
|
sbotc publish "{\"type\":\"about\",\"about\":\"$ssbpub\",\"description\":\"[Astroport Node](https://astroport.com) [$ipfsnodeid](http://localhost:8080/ipns/$ipfsnodeid) - Wallet $g1pub - $diskperf\",\"name\":\"$title\",\"image\":\"$id\"}"
|
||||||
|
|
||||||
# REQUEST DUNITER G1 Wallet balance
|
# REQUEST DUNITER G1 Wallet balance
|
||||||
|
@ -124,8 +128,11 @@ $g1balance
|
||||||
-- sbotc publish --
|
-- sbotc publish --
|
||||||
"
|
"
|
||||||
# IF no AVATAR, publish message with QRCode
|
# IF no AVATAR, publish message with QRCode
|
||||||
[[ ! $(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"'"}]}'
|
if [[ ! $(file "/tmp/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"')","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}'
|
||||||
|
fi
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue