From deda26e9b8189e268cdd21bc44ff0d9aa360e384 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Mon, 5 Jul 2021 18:45:21 -0600 Subject: [PATCH] Added script --- gdead | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 gdead diff --git a/gdead b/gdead new file mode 100755 index 0000000..503fb23 --- /dev/null +++ b/gdead @@ -0,0 +1,37 @@ +#!/bin/bash +# gdead + +# Get shows from archive.org + +# Vars +UA="Curl on bash/linux; Keith Irwin (www.ki9.us); Just testing the API" +START="$(date +%s)" # unix timestamp + +# Args +YYYY=$1 +MM=$2 +DD=$3 + +# Metadata search URL +URL="https://archive.org/advancedsearch.php?q=collection%3A%28GratefulDead%29+\ +AND+subject%3A%28soundboard%29+\ +AND+date%3A%5B$YYYY-$MM-$DD+TO+$YYYY-$MM-$DD%5D\ +&fl%5B%5D=avg_rating&fl%5B%5D=downloads&fl%5B%5D=identifier&fl%5B%5D=source&fl%5B%5D=title\ +&sort%5B%5D=num_favorites+asc&sort%5B%5D=avg_rating+asc&sort%5B%5D=num_reviews+asc\ +&rows=10&page=1&output=json&callback=c&save=yes#raw" + +# Prepare pipe +PIPE="/tmp/$START.gdead.fifo" +rm "$PIPE" 2>/dev/null +mkfifo "$PIPE" + +# Metadata search +first_res=$(curl --user-agent "$UA" --silent "$URL" | cut -c 3- | head -c-2 | jq -r '.response.docs[0].identifier') + +# Remove pipe +rm $PIPE 2>/dev/null + +# Stream it +#vlc --http-user-agent "$UA" --qt-system-tray --qt-start-minimized \ +nvlc --http-user-agent "$UA" \ +"https://archive.org/download/$first_res/${first_res}_vbr.m3u"