Introduction
Introduction Statistics Contact Development Disclaimer Help
tbrtv-generate-playlist.sh - bitreich-tv - meme tv encoding and streaming
git clone git://src.adamsgaard.dk/bitreich-tv
Log
Files
Refs
---
tbrtv-generate-playlist.sh (814B)
---
1 #!/bin/sh
2 # supply hashtags.txt as stdin
3 # output is a randomized plaintext playlist with urls to memes and respe…
4 # titles.
5
6
7 ### CONFIGURATION START
8
9 # other host to serve titles and images converted to videos
10 title_image_host="gopher://adamsgaard.dk"
11 title_dir="title"
12 img2vid_dir="img2vid"
13 video_ext="webm"
14
15 ### CONFIGURATION END
16
17
18 regeximatch() {
19 printf '%s' "$1" | grep -iEq "$2"
20 }
21
22 sort -R | while read -r tag url; do
23 printf '%s/9/%s/%s\n' "$title_image_host" "$title_dir" "${tag#\#…
24
25 if regeximatch "$url" '\.(mkv|webm|mp4)$'; then
26 printf '%s\n' "$url"
27 elif regeximatch "$url" '\.(jpg|jpeg|png)$'; then
28 printf '%s/9/%s/%s\n' "$title_image_host" "$img2vid_dir"…
29 else
30 # skip mpv-incompatible formats that are not converted t…
31 continue
32 fi
33 done
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.