myJune
This commit is contained in:
parent
4bee219be5
commit
1763e7a78e
|
@ -69,13 +69,13 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xl-9 mx-auto">
|
||||
<h1>Obtenir une invitation Astroport</h1><br><br>
|
||||
<h1>Envoyer un invitation</h1><br><br>
|
||||
</div>
|
||||
<div class="col-md-10 col-lg-8 col-xl-7 mx-auto">
|
||||
<form id="formphone">
|
||||
<div class="form-row">
|
||||
<div class="col-12 col-md-9 mb-2 mb-md-0">
|
||||
<input id="phone" type="phone" class="form-control form-control-lg" placeholder="Saisissez votre numéro de téléphone mobile...">
|
||||
<input id="phone" type="phone" class="form-control form-control-lg" placeholder="Saisissez un numéro de téléphone mobile...">
|
||||
</div>
|
||||
<div class="col-12 col-md-3">
|
||||
<button type="submit" class="btn btn-block btn-lg btn-primary">Valider!</button>
|
||||
|
|
|
@ -120,13 +120,13 @@ $id : $type : $size bits
|
|||
nodename=$(cat /etc/hostname)
|
||||
extension=$(echo $nodename | cut -d '.' -f 2)
|
||||
if [[ $extension == $nodename ]]; then
|
||||
nodename=$nodename.local
|
||||
nodename=$nodename.home
|
||||
fi
|
||||
|
||||
# OLD ssb-server 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"
|
||||
# NEW sbotc publish to oasis
|
||||
sbotc publish "{\"type\":\"about\",\"about\":\"$ssbpub\",\"description\":\"![QRCode]($qrid)\\n[Astroport #Swarm0 Station](https://astroport.com)\\n - [GChange Market](http://$nodename/gchange/#/app/wot/$g1pub) \\n - [Cesium Wallet](https://$nodename/cesium/#/app/wot/$g1pub/) \\n IPFS NODE ID : [$ipfsnodeid](http://localhost:8080/ipns/$ipfsnodeid) \\n DISK: $sizeAvail = $diskperf\",\"name\":\"$title\",\"image\":\"$id\"}"
|
||||
sbotc publish "{\"type\":\"about\",\"about\":\"$ssbpub\",\"description\":\"![QRCode]($qrid)\\n[Astroport #Swarm0 Station](https://astroport.com)\\n - [GChange Market](http://$nodename/gchange/#/app/wot/$g1pub) \\n - [Cesium - $myJune -](https://$nodename/cesium/#/app/wot/$g1pub/) \\n IPFS NODE ID : [$ipfsnodeid](http://localhost:8080/ipns/$ipfsnodeid) \\n DISK: $sizeAvail = $diskperf\",\"name\":\"$title\",\"image\":\"$id\"}"
|
||||
|
||||
########################################################################
|
||||
# DUNITER G1 Wallet balance
|
||||
|
@ -134,13 +134,20 @@ export LC_ALL=C.UTF-8 #attipix
|
|||
export LANG=C.UTF-8 #attipix
|
||||
DUNITERNODE=$($MY_PATH/tools/duniter_getnode.sh)
|
||||
[[ $DUNITERNODE ]] && g1balance=$(silkaj -p $DUNITERNODE balance $g1pub 2>&1) || g1balance=$(silkaj balance $g1pub 2>&1)
|
||||
silkajQuantitativeAmountPattern='Total\sQuantitative\s+=\s+(.*)\s+Ğ1'
|
||||
if [[ $g1balance =~ $silkajQuantitativeAmountPattern ]]
|
||||
then
|
||||
myJune="${BASH_REMATCH[1]}"
|
||||
else
|
||||
myJune="0 June"
|
||||
fi
|
||||
|
||||
# SSB PUBLISH G1 wallet silkaj balance
|
||||
json_escape () {
|
||||
printf '%s' "$1" | python -c 'import json,sys; print(json.dumps(sys.stdin.read()))'
|
||||
}
|
||||
INLINE=$(json_escape "$g1balance")
|
||||
# TODO FIND WHY THIS ***** COMA , IS EVERYWHERE
|
||||
# TODO FIND WHY THIS ***** COMA , IS EVERYWHERE NOT PUBLSHING silkaj
|
||||
# [[ $INLINE ]] && sbotc publish '{"type":"post","text":'$INLINE'}'
|
||||
|
||||
#INLINE="${g1balance@Q}"
|
||||
|
@ -159,7 +166,7 @@ $g1balance
|
|||
"
|
||||
# IF no AVATAR, publish message with QRCode
|
||||
if [[ ! $(file "/tmp/_g1.avatar.png" | grep 'PNG') ]]; then
|
||||
# Published on about document now
|
||||
sleep 1
|
||||
# sbotc publish '{"type":"post","text":"![QRCode]('"$qrid"')\n Scan QRCode with [Cesium](https://cesium.app).\n Thank you\n ONE :heart:","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}'
|
||||
else
|
||||
# Publish only if new avatar
|
||||
|
|
Loading…
Reference in New Issue