bitreich-tv

meme tv encoding and streaming
git clone git://src.adamsgaard.dk/bitreich-tv
Log | Files | Refs | LICENSE Back to index

commit 6432f2d9498ec1bd3f401eb6629e86b5de9fda97
parent 43e65f21c98fa9ebc6d8970e1b877db0804eed3f
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon,  2 Nov 2020 20:46:54 +0100

add script to generate theme channels with commonly used tag openings

Diffstat:
Abin/brtv-generate-theme-channels.sh | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/bin/brtv-generate-theme-channels.sh b/bin/brtv-generate-theme-channels.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# generate channels where tags begin with a common word +# pass hashtags.txt as stdin +# optionally specify cutoff value as $1 + +awk -v cutoff="${1:-25}" ' +/^#[A-z0-9]+-.* / { + split($1, tagwords, "-") + tags[tagwords[1]]++ +} +END { + for (tag in tags) + if (tags[tag] >= cutoff) + print tag +} +' | while read -r tag; do + grep -E "^${tag}-" "${annna}/${tagfile}" | \ + sort -R | \ + bin/brtv-generate-playlist.sh | \ + bin/brtv-playlist-to-m3u.sh > "${tag#\#}.m3u" +done