git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/mio/bin
diff options
context:
space:
mode:
authormail_redacted_for_web 2021-07-13 13:13:40 +0200
committermail_redacted_for_web 2021-07-13 13:13:40 +0200
commita84c6ee664c15481b92a84b50172c85d37c6191f (patch)
tree0ce08db84a2156daa5af48582e9b20ddbeec721a /ansible/mio/bin
downloadlulz-a84c6ee664c15481b92a84b50172c85d37c6191f.tar.bz2
initiale überweisung diesdas
Diffstat (limited to 'ansible/mio/bin')
-rwxr-xr-xansible/mio/bin/mio15
1 files changed, 15 insertions, 0 deletions
diff --git a/ansible/mio/bin/mio b/ansible/mio/bin/mio
new file mode 100755
index 0000000..1362c8c
--- /dev/null
+++ b/ansible/mio/bin/mio
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+YOUTUBE="https://www.youtube.com/watch?v="
+MYTGT="/tmp/mio"
+MYMIOCOLL="/var/lib/mio/mio.lst"
+
+rm -vf "$MYTGT"*
+
+MYLINES="$(wc -l "$MYMIOCOLL"|awk '{print $1}')"
+MYMIO="$(head -n "$((RANDOM%$MYLINES+1))" "$MYMIOCOLL"|tail -n1)"
+unset MYLINES MYMIOCOLL
+MYMIOTUBE="${YOUTUBE}${MYMIO}"
+unset MYMIO
+#echo "$MYMIOTUBE"
+youtube-dl --write-description --write-info-json -o "/tmp/mio.%(ext)s" "$MYMIOTUBE"