diff --git a/tools/TUBE.copy.sh b/tools/TUBE.copy.sh index e7e28517..ebef18b1 100755 --- a/tools/TUBE.copy.sh +++ b/tools/TUBE.copy.sh @@ -40,42 +40,42 @@ for yurl in $(cat ~/.zen/tmp/tiddlers.json | jq -r '.[].text' | grep 'http'); do yt-dlp -f "bv*[ext=mp4][height<=480]+ba/b[height<=480] / wv*+ba/w" --no-mtime --embed-thumbnail --add-metadata -o "$HOME/.zen/tmp/tube/%(title)s.%(ext)s" ${yurl} # Get last writen file... TOTDO: Could we do better ? - FILE=$(ls -t ~/.zen/tmp/tube/ | tail -n 1) - [[ ! -f ~/.zen/tmp/tube/$FILE ]] && echo "No FILE -- EXIT --" && exit 1 + ZFILE=$(ls -t ~/.zen/tmp/tube/ | tail -n 1) + [[ ! -f ~/.zen/tmp/tube/$ZFILE ]] && echo "No FILE -- EXIT --" && exit 1 - echo "~/.zen/tmp/tube/$FILE downloaded" + echo "~/.zen/tmp/tube/$ZFILE downloaded" echo "Adding to IPFS" - ILINK=$(ipfs add -q "$HOME/.zen/tmp/tube/$FILE" | tail -n 1) + ILINK=$(ipfs add -q "$HOME/.zen/tmp/tube/$ZFILE" | tail -n 1) echo "/ipfs/$ILINK ready" - MIME=$(file --mime-type "$HOME/.zen/tmp/tube/$FILE" | rev | cut -d ' ' -f 1 | rev) + MIME=$(file --mime-type "$HOME/.zen/tmp/tube/$ZFILE" | rev | cut -d ' ' -f 1 | rev) - TEXT="