diff options
author | mail_redacted_for_web | 2021-07-13 13:13:40 +0200 |
---|---|---|
committer | mail_redacted_for_web | 2021-07-13 13:13:40 +0200 |
commit | a84c6ee664c15481b92a84b50172c85d37c6191f (patch) | |
tree | 0ce08db84a2156daa5af48582e9b20ddbeec721a /ansible/mio/bin | |
download | lulz-a84c6ee664c15481b92a84b50172c85d37c6191f.tar.bz2 |
initiale überweisung diesdas
Diffstat (limited to 'ansible/mio/bin')
-rwxr-xr-x | ansible/mio/bin/mio | 15 |
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" |