♥BOX Edition

This commit is contained in:
fred 2022-12-26 22:05:32 +01:00
parent d284a3ef82
commit b4686b48b6
3 changed files with 21 additions and 18 deletions

View File

@ -148,16 +148,16 @@ if [[ ! ${TIDDLER} ]]; then
[[ ! -f "$HOME/.zen/tmp/yt-dlp/$ZFILE" ]] && echo "No FILE -- CONTINUE --" && continue [[ ! -f "$HOME/.zen/tmp/yt-dlp/$ZFILE" ]] && echo "No FILE -- CONTINUE --" && continue
echo echo
## LIMIT TO 12 MAXIMUM COPY PER DAY PER PLAYER
boucle=$((boucle+1))
espeak "Video Number $boucle" > /dev/null 1>&2
#################################################### ####################################################
echo "FOUND : ~/.zen/tmp/yt-dlp/$ZFILE" echo "FOUND : ~/.zen/tmp/yt-dlp/$ZFILE"
FILE_BSIZE=$(du -b "$HOME/.zen/tmp/yt-dlp/$ZFILE" | awk '{print $1}') FILE_BSIZE=$(du -b "$HOME/.zen/tmp/yt-dlp/$ZFILE" | awk '{print $1}')
FILE_SIZE=$(echo "${FILE_BSIZE}" | awk '{ split( "B KB MB GB TB PB" , v ); s=1; while( $1>1024 ){ $1/=1024; s++ } printf "%.2f %s", $1, v[s] }') FILE_SIZE=$(echo "${FILE_BSIZE}" | awk '{ split( "B KB MB GB TB PB" , v ); s=1; while( $1>1024 ){ $1/=1024; s++ } printf "%.2f %s", $1, v[s] }')
echo "FILE SIZE = $FILE_SIZE ($FILE_BSIZE octets)" echo "FILE SIZE = $FILE_SIZE ($FILE_BSIZE octets)"
## LIMIT TO 12 MAXIMUM COPY PER DAY PER PLAYER
boucle=$((boucle+1))
espeak "Video Number $boucle FILE SIZE = $FILE_SIZE" > /dev/null 1>&2
#~ ## PREPARE FOR new_file_in_astroport.sh #~ ## PREPARE FOR new_file_in_astroport.sh
#~ mkdir -p "$HOME/Astroport/youtube/$YID" #~ mkdir -p "$HOME/Astroport/youtube/$YID"
#~ REVSOURCE="$(echo "$ZYURL" | awk -F/ '{print $3}' | rev)_" #~ REVSOURCE="$(echo "$ZYURL" | awk -F/ '{print $3}' | rev)_"
@ -221,13 +221,13 @@ if [[ ! ${TIDDLER} ]]; then
] ]
' > "$HOME/.zen/tmp/$IPFSNODEID/G1CopierYoutube/$PLAYER/$YID.TW.json" ' > "$HOME/.zen/tmp/$IPFSNODEID/G1CopierYoutube/$PLAYER/$YID.TW.json"
else else
################################################################### ###################################################################
# TIDDLER WAS IN CACHE # TIDDLER WAS IN CACHE
################################################################### ###################################################################
## TODO : ADD EMAIL TO TAG ( TIMESTAMP & ADD SIGNATURE over existing ones) ## TODO : ADD EMAIL TO TAG ( TIMESTAMP & ADD SIGNATURE over existing ones)
[[ "${TIDDLER}" != "$HOME/.zen/tmp/$IPFSNODEID/G1CopierYoutube/$PLAYER/$YID.TW.json" ]] \ cp "${TIDDLER}" "$HOME/.zen/game/$PLAYER/G1CopierYoutube/"
&& cp "${TIDDLER}" "$HOME/.zen/tmp/$IPFSNODEID/G1CopierYoutube/$PLAYER/$YID.TW.json"
fi fi
@ -249,6 +249,9 @@ fi
# --deletetiddlers '[tag[CopierYoutube]]' ### REFRESH CHANNEL COPY # --deletetiddlers '[tag[CopierYoutube]]' ### REFRESH CHANNEL COPY
if [[ -s ~/.zen/tmp/$IPFSNODEID/newindex.html ]]; then if [[ -s ~/.zen/tmp/$IPFSNODEID/newindex.html ]]; then
## COPY JSON TIDDLER TO PLAYER
cp "$HOME/.zen/tmp/$IPFSNODEID/G1CopierYoutube/$PLAYER/$YID.TW.json" "$HOME/.zen/game/$PLAYER/G1CopierYoutube/"
ln -s "$HOME/.zen/game/$PLAYER/G1CopierYoutube/$YID.TW.json" "$HOME/.zen/game/$PLAYER/G1CopierYoutube/$ZFILE.json"
[[ $(diff ~/.zen/tmp/$IPFSNODEID/newindex.html ${INDEX} ) ]] && cp ~/.zen/tmp/$IPFSNODEID/newindex.html ${INDEX} && echo "===> Mise à jour ${INDEX}" [[ $(diff ~/.zen/tmp/$IPFSNODEID/newindex.html ${INDEX} ) ]] && cp ~/.zen/tmp/$IPFSNODEID/newindex.html ${INDEX} && echo "===> Mise à jour ${INDEX}"
else else
echo "Problem with tiddlywiki command. Missing ~/.zen/tmp/$IPFSNODEID/newindex.html" echo "Problem with tiddlywiki command. Missing ~/.zen/tmp/$IPFSNODEID/newindex.html"

File diff suppressed because one or more lines are too long

View File

@ -100,7 +100,7 @@ if [[ $SALT != "" && PEPPER != "" ]]; then
fi fi
################################################################################ ################################################################################
TWMODEL="/ipfs/bafybeiel2pidycxek6jxjwat5wt4estn2fm4phhvhmlmmhq7dcltbp7nsi" TWMODEL="/ipfs/bafybeibljznrdd6krwtwr4ot5vqovbz2ivnwojh74bqiu4oapeejx54ima"
# ipfs cat $TWMODEL > templates/twdefault.html # ipfs cat $TWMODEL > templates/twdefault.html
##################################################### # NEW PLAYER ############### ##################################################### # NEW PLAYER ###############
################################################################################ ################################################################################