From 855aaef437b539b66862d27768a9ccda73c36f9e Mon Sep 17 00:00:00 2001 From: fred Date: Mon, 10 Oct 2022 01:46:04 +0200 Subject: [PATCH] No Tube --- ASTROBOT/TUBE.copy.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ASTROBOT/TUBE.copy.sh b/ASTROBOT/TUBE.copy.sh index 544a8fff..a3a034ea 100755 --- a/ASTROBOT/TUBE.copy.sh +++ b/ASTROBOT/TUBE.copy.sh @@ -27,8 +27,14 @@ TWNS=$(ipfs key list -l | grep -w $WISHKEY | cut -d ' ' -f1) MOATS=$(date -u +"%Y%m%d%H%M%S%4N") mkdir -p ~/.zen/tmp/$WISHKEY +################################################################### rm -f ~/.zen/tmp/$WISHKEY/tube.json -tiddlywiki --verbose --load ${INDEX} --output ~/.zen/tmp/$WISHKEY --render '.' 'tube.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[tube]]' +tiddlywiki --load ${INDEX} \ + --output ~/.zen/tmp/$WISHKEY \ + --render '.' 'tube.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[tube]]' + +[[ ! -s ~/.zen/tmp/$WISHKEY/tube.json ]] && echo "NO TUBE" && exit 0 +################################################################### ## Extract URL from text field for YURL in $(cat ~/.zen/tmp/$WISHKEY/tube.json | jq -r '.[].text' | grep 'http'); do @@ -41,8 +47,9 @@ for YURL in $(cat ~/.zen/tmp/$WISHKEY/tube.json | jq -r '.[].text' | grep 'http' done # FINISH YURL loop ################################################################### -[[ ! -s ~/.zen/tmp/$WISHKEY/ytids.$MOATS ]] && echo "NO TUBE" && exit 0 +################################################################### +# PROCESS YOUTUBEID ################################################################### while read YID; do