bunkerbox/tools/get_astrXbian_youtube.sh

17 lines
569 B
Bash
Executable File

#!/bin/bash
# echo create data set from astrXbian youtube copies to include into caroussel
IPFSNODEID=$(cat ~/.ipfs/config | jq -r .Identity.PeerID)
[[ ! $IPFSNODEID ]] && echo "Please Install IPFS & astrXbian for this to work" && exit 1
for line in $(cat ~/.zen/ipfs/.$IPFSNODEID/YASTRXBIAN); do
source=$(echo $line | rev | cut -d ';' -f 1 | rev)
title=$(echo $line | cut -d ';' -f 4 )
DATA="$DATA { src : '"${source}"', poster: '"/ipns/crowdbunker.com/styles/logo.png"', mime : 'video/mp4', title : '"${title}"' },"
done
echo 'videos : [ '$DATA' ]'