Browse Source

publish informations

pull/38/head
fred 2 months ago
parent
commit
536395d79d
  1. 23
      zen/gchange_INIT.sh
  2. 6
      zen/ipfs_SWARM_refresh.sh

23
zen/gchange_INIT.sh

@ -41,18 +41,18 @@ cat ~/.zen/ipfs/.${IPFSNODEID}/tryme.addr
# ADD GCHANGE+ informations
########################################################################
GCHANGE="https://data.gchange.fr"
## GET LATEST GCHANGE PROFILE
echo"## GET LATEST GCHANGE PROFILE"
curl -s ${GCHANGE}/user/profile/${G1PUB} > ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange.json
# UPDATE _g1.gchange_title
title=$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange.json | jq -r '._source.title')
[[ $title ]] && echo "$title" > ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title
Gtitle=$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange.json | jq -r '._source.title')
[[ $Gtitle ]] && echo "$Gtitle" > ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title
echo"# ACTUAL _g1.gchange_title=$Gtitle"
# UPDATE _g1.astroport_title with city
title="Station $YOU@$XZUID"
Atitle="Station $YOU@$XZUID"
city=$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange.json | jq -r '._source.city')
[[ "$city" != "null" ]] && title="$title in $city"
echo "$title" > ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.astroport_title
[[ "$city" != "null" ]] && Atitle="$Atitle in $city"
echo "$Atitle" > ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.astroport_title
# UPDATE _g1.gchange_avatar.png
cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange.json | jq -r '._source.avatar._content' | base64 -d > "/home/$YOU/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_avatar.png"
@ -74,7 +74,6 @@ export LANG=C.UTF-8 #attipix
# _g1.pubkey
[[ ! ~/.zen/ipfs/.${IPFSNODEID}/G1SSB/_g1.pubkey ]] && echo "$G1PUB" > ~/.zen/ipfs/.${IPFSNODEID}/G1SSB/_g1.pubkey
# ipfsnodeid
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/.ipfsnodeid ]] && echo ${IPFSNODEID} > ~/.zen/ipfs/.${IPFSNODEID}/.ipfsnodeid
@ -125,12 +124,14 @@ sed -i "s/_UPDATED_/$updated/g" $wiki
# https:\/\/www.gchange.fr\/#\/app\/records\/wallet?q=$G1PUB
########################################################################
## PREPARE www EXCHANGE ZONE .$IPFSNODEID/astroport/www
## CREATING www EXCHANGE ZONE .$IPFSNODEID/astroport/www
if [[ ! -d /home/$YOU/astroport/www ]]; then
wwwuser=$(ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1) || wwuser="www-data"
mkdir -p /home/$YOU/astroport/www
chown -R $YOU:$wwwuser /home/$YOU/astroport/www
chmod -R g+rw /home/$YOU/astroport/www
else
echo ".$IPFSNODEID/astroport/www exchange zone OK"
fi
########################################################################
###
@ -171,6 +172,10 @@ do
sleep $((1 + RANDOM % 2)) # SLOW DOWN
~/.zen/astrXbian/zen/tools/timeout.sh -t 12 ~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars -p $liking_me -n 1
sleep $((1 + RANDOM % 2)) # SLOW DOWN
## IF DISCONNECTED FROM GCHANGE - create FRIEND Space (Need Web UI session)
## touch ~/.zen/ipfs/.${IPFSNODEID}/FRIENDS/$liking_me/tryme.addr
## echo 1 > ~/.zen/ipfs/.${IPFSNODEID}/FRIENDS/$liking_me/stars.level
fi
fi

6
zen/ipfs_SWARM_refresh.sh

@ -308,7 +308,7 @@ echo "<html>
</head>
<body><header>
<h1>
<a href=\"https://www.gchange.fr/#/app/user/$G1PUB/\"><span>Compte Gchange $zuid</span> × <span>, ses Amis : $updated</span></a>
<a href=\"https://www.gchange.fr/#/app/user/$G1PUB/\"><span>$zuid (gchange)</span> x <span>, Amis Astroport ($updated)</span></a>
</h1>
</header>
@ -326,6 +326,10 @@ echo "<li>
$ipfsnodeid
</a>
</p>
<p class='video-title'>
Disk :: $(cat ~/.zen/ipfs_swarm/.$ipfsnodeid/disk.perf) :: $(cat ~/.zen/ipfs_swarm/.$ipfsnodeid/disk.bytes) octets
<br>Ping :: $(cat ~/.zen/ipfs/.IPFSNODEID/FRIENDS/$whoisg1/ping.average.txt)
</p>
<iframe id=\"$ipfsnodeid\"
title='tiddlywiki $whoisg1'
width='600'

Loading…
Cancel
Save