Add example script generating playlist with new memes - bitreich-tv - Meme TV encoding and streaming
 (HTM) git clone git://bitreich.org/bitreich-tv git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/bitreich-tv
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) LICENSE
       ---
 (DIR) commit d6ab2724c3fce4a03e2806951534e638844ba65c
 (DIR) parent 0474236fd0133c2c595f5df4851639867913925b
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Sun, 16 Aug 2020 22:49:38 +0200
       
       Add example script generating playlist with new memes
       
       Diffstat:
         A brtv-news.sh                        |      14 ++++++++++++++
       
       1 file changed, 14 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/brtv-news.sh b/brtv-news.sh
       @@ -0,0 +1,14 @@
       +#!/bin/sh
       +# outputs m3u playlist of memes added to the memecache the last two days
       +
       +set -e
       +
       +annna="/home/ad/code/annna"
       +tagfile="modules/hashtags/hashtags.txt"
       +
       +(cd "/home/ad/code/annna" &&
       +        git log --all --pretty="%s" --date=relative --since="2 days ago") | \
       +grep 'Adding #' | sed 's/.* #/#/;s/ .*//' | \
       +while read -r tag; do
       +        grep "$tag" "${annna}/${tagfile}" | head -1
       +done | ./bin/brtv-generate-playlist.sh | ./bin/brtv-playlist-to-m3u.sh