forked from STI/Astroport.ONE
FRIENDSFEEDS et IFRIENDHEAD
This commit is contained in:
parent
2cf381f724
commit
8b94ff9d83
|
@ -134,7 +134,9 @@ isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(
|
|||
echo '[{"title":"$:/ipfs/saver/api/http/localhost/5001","tags":"$:/ipfs/core $:/ipfs/saver/api","text":"'$APIGW'"}]' > ~/.zen/tmp/${MOATS}/5001.json
|
||||
echo '[{"title":"$:/ipfs/saver/gateway/http/localhost","tags":"$:/ipfs/core $:/ipfs/saver/gateway","text":"'$IPFSGW'"}]' > ~/.zen/tmp/${MOATS}/8080.json
|
||||
|
||||
FRIENDSFEEDS=$(cat ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/FRIENDSFEEDS 2>/dev/null)
|
||||
echo "FRIENDS FEEDS : "${FRIENDSFEEDS}
|
||||
|
||||
## export FRIENDSFEEDS from Gchange stars
|
||||
echo '[{"title":"$:/plugins/astroport/lightbeams/state/subscriptions","text":"'${FRIENDSFEEDS}'","tags":""}]' > ~/.zen/tmp/${MOATS}/friends.json
|
||||
|
||||
|
@ -181,12 +183,13 @@ isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(
|
|||
echo "================================================"
|
||||
|
||||
######################### PLAYER_feed
|
||||
IFRIENDHEAD="$(cat ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/IFRIENDHEAD 2>/dev/null)"
|
||||
echo "(☉_☉ ) (☉_☉ ) (☉_☉ )"
|
||||
echo "IFRIENDHEAD :" ${IFRIENDHEAD}
|
||||
echo "(☉_☉ ) (☉_☉ ) (☉_☉ )"
|
||||
# cp -f ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.rss.json ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/${FPLAYER}.rss.json
|
||||
[[ -d ~/.zen/game/players/$PLAYER/FRIENDS ]] \
|
||||
&& cat ${MY_PATH}/../www/iframe.html | sed "s~_ME_~${IPFSGW}/ipns/${ASTRONAUTENS}~g" > ~/.zen/game/players/$PLAYER/FRIENDS/index.html
|
||||
&& cat ${MY_PATH}/../www/iframe.html | sed "s~_ME_~${IPFSGW}/ipns/${ASTRONAUTENS}~g" | sed "s~_IFRIENDHEAD_~${IFRIENDHEAD}~g" > ~/.zen/game/players/$PLAYER/FRIENDS/index.html
|
||||
|
||||
[[ -s ~/.zen/game/players/$PLAYER/FRIENDS/index.html ]] \
|
||||
&& FRAME=$(ipfs add -Hq ~/.zen/game/players/$PLAYER/FRIENDS/index.html | tail -n 1) \
|
||||
|
|
|
@ -150,6 +150,10 @@ do
|
|||
LIBRA=$(head -n 2 ~/.zen/Astroport.ONE/A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f 2)
|
||||
echo "$LIBRA/ipns/$FRIENDNS"
|
||||
echo "http://$myIP:8080/ipns/$FRIENDNS ($YOU)"
|
||||
|
||||
# DISPLAY TIMER
|
||||
${MY_PATH}/displaytimer.sh 17 &
|
||||
|
||||
[[ $YOU ]] && ipfs --timeout 17s cat /ipns/$FRIENDNS > ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html
|
||||
[[ ! -s ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html ]] && curl -m 17 -so ~/.zen/game/players/${PLAYER}/FRIENDS/${liking_me}/index.html "$LIBRA/ipns/$FRIENDNS"
|
||||
|
||||
|
@ -158,7 +162,7 @@ do
|
|||
|
||||
## AUCUN VISA ASTRONAUTE ENVOYER UN MESSAGE PAR GCHANGE
|
||||
echo "AUCUN TW ACTIF. PREVENONS LE"
|
||||
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" send -d "${liking_me}" -t "HEY BRO !" -m ">>> (◕‿‿◕) <<< https://ipfs.copylaradio.com/ipns/$ASTRONAUTENS >>> (◕‿‿◕) <<< Mon TW BunkerBOX"
|
||||
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" send -d "${liking_me}" -t "HEY BRO !" -m "G1 TW BunkerBOX >>> (⌐■_■) <<< https://ipfs.copylaradio.com/ipns/$ASTRONAUTENS >>> (ᵔ◡◡ᵔ) <<< "
|
||||
|
||||
else
|
||||
|
||||
|
@ -186,10 +190,12 @@ do
|
|||
cp -f ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.rss.json ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/${FPLAYER}.rss.json
|
||||
|
||||
export FRIENDSFEEDS="$ASTRONAUTEFEED\n$FRIENDSFEEDS"
|
||||
echo "$FRIENDSFEEDS" > ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/FRIENDSFEEDS
|
||||
|
||||
echo "(☉_☉ ) (☉_☉ ) (☉_☉ )" $FRIENDSFEEDS
|
||||
|
||||
export IFRIENDHEAD="<a target='you' href='/ipns/"$FRIENDNS"'>$$FRIENDTITLE</a>$IFRIENDHEAD"
|
||||
echo "$IFRIENDHEAD" > ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/IFRIENDHEAD
|
||||
|
||||
echo "(☉_☉ ) (☉_☉ ) (☉_☉ )" $IFRIENDHEAD
|
||||
|
||||
|
|
Loading…
Reference in New Issue