This commit is contained in:
fred 2022-10-12 00:44:24 +02:00
parent 9c7e8dc630
commit 264fc9de32
4 changed files with 9 additions and 17 deletions

View File

@ -6,6 +6,7 @@
MY_PATH="`dirname \"$0\"`" # relative MY_PATH="`dirname \"$0\"`" # relative
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
ME="${0##*/}" ME="${0##*/}"
echo "-----"
echo "$ME RUNNING" echo "$ME RUNNING"
# Need TW index.html path + IPNS publication Key (available in IPFS keystore) # Need TW index.html path + IPNS publication Key (available in IPFS keystore)
# Search for "tube" tagged tiddlers to get URL # Search for "tube" tagged tiddlers to get URL
@ -37,7 +38,6 @@ tiddlywiki --load ${INDEX} \
--output ~/.zen/tmp/$WISHKEY \ --output ~/.zen/tmp/$WISHKEY \
--render '.' 'CopierYoutube.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[CopierYoutube]]' --render '.' 'CopierYoutube.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[CopierYoutube]]'
[[ ! -s ~/.zen/tmp/$WISHKEY/CopierYoutube.json ]] && echo "NO TUBE" && exit 0
################################################################### ###################################################################
## TEXT TREATMENT ## TEXT TREATMENT
## For this TAG, specific extract URL from text field and copy all video from links into tid.json ## For this TAG, specific extract URL from text field and copy all video from links into tid.json
@ -50,6 +50,8 @@ for YURL in $(cat ~/.zen/tmp/$WISHKEY/CopierYoutube.json | jq -r '.[].text' | gr
done # FINISH YURL loop done # FINISH YURL loop
###################################################################
[[ ! -s ~/.zen/tmp/$WISHKEY/ytids.$MOATS ]] && echo "AUCUN YOUTUBEID pour CopierYoutube" && exit 0
################################################################### ###################################################################
################################################################### ###################################################################
@ -58,7 +60,6 @@ done # FINISH YURL loop
while read YID; while read YID;
do do
[[ -f ~/.zen/tmp/$WISHKEY/$YID.TW.json ]] && echo "Tiddler json already existing : ~/.zen/tmp/$WISHKEY/$YID.TW.json" && continue [[ -f ~/.zen/tmp/$WISHKEY/$YID.TW.json ]] && echo "Tiddler json already existing : ~/.zen/tmp/$WISHKEY/$YID.TW.json" && continue
# SINGLE VIDEO YURL # SINGLE VIDEO YURL
@ -157,17 +158,4 @@ while read YID;
fi fi
done < ~/.zen/tmp/$WISHKEY/ytids.$MOATS # FINISH YID loop 1 done < ~/.zen/tmp/$WISHKEY/ytids.$MOATS # FINISH YID loop 1
exit 0
## FINAL TW IPNS PUBLISHING
echo "ipfs name publish -k $WISHKEY ($INDEX)"
ILINK=$(ipfs add -q $INDEX | tail -n 1)
echo "/ipfs/$ILINK"
ipfs name publish -k $WISHKEY /ipfs/$ILINK
myIP=$(hostname -I | awk '{print $1}' | head -n 1)
echo "=========================="
echo "Nouveau TW"
echo "http://$myIP:8080/ipns/$TWNS"
# Removing tag=tube
# --deletetiddlers '[tag[tube]]'

View File

@ -30,6 +30,7 @@ for PLAYER in $(ls ~/.zen/game/players/); do
# Get PLAYER wallet amount # Get PLAYER wallet amount
BAL=$($MY_PATH/../tools/jaklis/jaklis.py -k ~/.zen/game/players/$PLAYER/secret.dunikey balance) BAL=$($MY_PATH/../tools/jaklis/jaklis.py -k ~/.zen/game/players/$PLAYER/secret.dunikey balance)
echo "+++ WALLET BALANCE _ $BAL (G1) _" echo "+++ WALLET BALANCE _ $BAL (G1) _"
echo
myIP=$(hostname -I | awk '{print $1}' | head -n 1) myIP=$(hostname -I | awk '{print $1}' | head -n 1)

View File

@ -19,10 +19,12 @@ PLAYER="$2" ## IPNS KEY NAME - G1PUB - PLAYER ...
[[ ! $PLAYER ]] && echo "Please provide IPFS publish key" && exit 1 [[ ! $PLAYER ]] && echo "Please provide IPFS publish key" && exit 1
ASTRONAUTENS=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f1) ASTRONAUTENS=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f1)
[[ ! $ASTRONAUTENS ]] && echo "$PLAYER IPNS INTROUVABLE" && exit 1
myIP=$(hostname -I | awk '{print $1}' | head -n 1) myIP=$(hostname -I | awk '{print $1}' | head -n 1)
## EXPORT [tag[voeu]] ## EXPORT [tag[voeu]]
echo '## EXPORT FROM $PLAYER TW "[tag[voeu]]"' echo "## EXPORT FROM $PLAYER TW [tag[voeu]] $INDEX"
rm -f ~/.zen/tmp/voeu.json rm -f ~/.zen/tmp/voeu.json
tiddlywiki --load ${INDEX} --output ~/.zen/tmp --render '.' 'voeu.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[voeu]]' tiddlywiki --load ${INDEX} --output ~/.zen/tmp --render '.' 'voeu.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[voeu]]'

View File

@ -19,6 +19,7 @@ for v in $(cat ~/.zen/game/players/*/VOEUx/*/.title); do echo $v ;done
for VOEU in $(ls ~/.zen/game/world/); for VOEU in $(ls ~/.zen/game/world/);
do do
[[ ! -d ~/.zen/game/world/$VOEU ]] && echo "BAD $VOEU - CONTINUE -" && continue
## CLEAN OLD CACHE ## CLEAN OLD CACHE
rm -Rf ~/.zen/tmp/work rm -Rf ~/.zen/tmp/work
mkdir -p ~/.zen/tmp/work mkdir -p ~/.zen/tmp/work