$:/plugins/astroport/lightbeams
This commit is contained in:
parent
2743ddbb8f
commit
a9ffbaf2fe
|
@ -14,8 +14,12 @@ ME="${0##*/}"
|
|||
echo "## RUNNING PLAYER.refresh"
|
||||
IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||
|
||||
PLAYERONE="$1"
|
||||
[[ ! $PLAYERONE ]] && PLAYERONE=$(ls -t ~/.zen/game/players/)
|
||||
|
||||
## RUNING FOR ALL LOCAL PLAYERS
|
||||
for PLAYER in $(ls -t ~/.zen/game/players/); do
|
||||
for PLAYER in $PLAYERONE; do
|
||||
[[ ! -d ~/.zen/game/players/$PLAYERONE ]] && echo "BAD $PLAYERONE" && continue
|
||||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||
[[ $PLAYER == "user" || $PLAYER == "zen" ]] && continue
|
||||
mkdir -p ~/.zen/tmp/${MOATS}
|
||||
|
@ -123,9 +127,11 @@ 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
|
||||
|
||||
## UPDATE LightBeam Plugin Tiddler
|
||||
## export PLAYERFEEDS from Gchange stars
|
||||
echo '[{"title":"$:/plugins/astroport/lightbeams/state/subscriptions","text":"'${PLAYERFEEDS}'","tags":""}]' > ~/.zen/tmp/${MOATS}/friends.json
|
||||
## UPDATE LightBeam Plugin Tiddler $PLAYER_feed
|
||||
# $:/plugins/astroport/lightbeams/saver/ipns/lightbeam-name
|
||||
# $:/plugins/astroport/lightbeams/saver/ipns/lightbeam-key
|
||||
## export FRIENDSFEEDS from Gchange stars
|
||||
echo '[{"title":"$:/plugins/astroport/lightbeams/state/subscriptions","text":"'${FRIENDSFEEDS}'","tags":""}]' > ~/.zen/tmp/${MOATS}/friends.json
|
||||
|
||||
tiddlywiki --load ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/index.html \
|
||||
--import "$HOME/.zen/tmp/${MOATS}/5001.json" "application/json" \
|
||||
|
|
|
@ -172,13 +172,18 @@ do
|
|||
--output ~/.zen/game/players/${PLAYER}/ipfs --render '.' "${FPLAYER}.rss.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[days:created[-30]]'
|
||||
[[ ! -s ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.rss.json ]] && echo "NO ${FPLAYER} RSS - CONTINUE -" && continue
|
||||
|
||||
tiddlywiki --load ${FTW} \
|
||||
--output ~/.zen/game/players/${PLAYER}/ipfs --render '.' "${FPLAYER}.lightbeam-key.json" 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-key'
|
||||
[[ ! -s ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.lightbeam-key.json ]] && echo "NO ${FPLAYER} lightbeam-key - CONTINUE -" && continue
|
||||
ASTRONAUTEFEED=$(cat ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.lightbeam-key.json | jq -r .[].text)
|
||||
|
||||
## ADD THIS FPLAYER RSS FEED INTO PLAYER TW
|
||||
## PUSH DATA TO 12345 SWARM KEY
|
||||
mkdir -p ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}
|
||||
cp -f ~/.zen/game/players/${PLAYER}/ipfs/${FPLAYER}.rss.json ~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/${FPLAYER}.rss.json
|
||||
|
||||
## TODO INSERT INTO $:/plugins/astroport/lightbeams/state/subscriptions
|
||||
export PLAYERFEEDS="$ASTRONAUTENS\n$PLAYERFEEDS"
|
||||
export FRIENDSFEEDS="$ASTRONAUTEFEED\n$FRIENDSFEEDS"
|
||||
|
||||
echo "APP=RSS : PLAYER FPLAYER RSS PUBLICATION READY"
|
||||
echo "~/.zen/tmp/${IPFSNODEID}/rss/${PLAYER}/${FPLAYER}.rss.json"
|
||||
|
|
Loading…
Reference in New Issue