bunkerbox/tools/get_astrXbian_film.sh

18 lines
687 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/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 'videos : [ '$DATA' ]'