diff --git a/tools/get_astrXbian_film.sh b/tools/get_astrXbian_film.sh index 42b4811..517ff25 100755 --- a/tools/get_astrXbian_film.sh +++ b/tools/get_astrXbian_film.sh @@ -1,13 +1,17 @@ #!/bin/bash -[[ ! $1 ]] && echo "You must provide 'qo-op' IPNS key"&& exit 1 -# echo create data set to include into tagcloud -DATA="" +# echo create data set from astrXbian youtube copies to include into caroussel +IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID) -for channel in $(ls ~/.zen/bunkerbox/channels); do +[[ ! $IPFSNODEID ]] && echo "Please Install IPFS & astrXbian for this to work" && exit 1 - howmuch=$(jq '.Videos | length' ~/.zen/bunkerbox/history.${channel}.json) - DATA="$DATA { name: '"${channel}"', link: '"/ipns/$1/tw/${channel}"', weight: "${howmuch}", tooltip: '"${channel}"' }," +for line in $(cat ~/.zen/ipfs/.$IPFSNODEID/FASTRXBIAN); do + + source=$(echo $line | rev | cut -d ';' -f 1 | rev) ## urlencoded filename ipfs link + title=$(echo $line | cut -d ';' -f 4 ) + ipns=$(echo $line | cut -d ';' -f 7 ) # Use ipns if you wish to add contracts... + + DATA="$DATA { src : '"${source}"', poster: '"/ipns/crowdbunker.com/styles/logo.png"', mime : 'video/mp4', title : '"${title}"' }," done -echo 'data: [ '$DATA' ]' +echo 'videos : [ '$DATA' ]'