|
@@ -0,0 +1,18 @@
|
|
|
+#!/bin/bash
|
|
|
+
|
|
|
+WEBSITE="https://vaporwave.ivan.moe/list/"
|
|
|
+wget -qO- $WEBSITE 2>/dev/null \ # Retrieve artist list
|
|
|
+ | grep "^<a href" \ # Search for anchor tags
|
|
|
+ | sed -e 's/<a href="//' \ # Remove <a href="
|
|
|
+ -e 's/">/\n/' \ # Remove > (at the end of <a> tag) and substitute with \n
|
|
|
+ -e 's/><\/a>.*/\noff/' \ # Remove ></a> and everything after it (> is used by the website to indicate long names which don't fit on the page)
|
|
|
+ -e 's/\/<\/a>.*/\noff/' \ # Remove /</a> and everything after it
|
|
|
+ | xargs -d '\n' dialog --title "Test" --checklist "Menu" 0 0 0 3>&1 1>&2 2>&3 3>&- \ # Produce dialog menu to let the user choose artists
|
|
|
+ | sed -e 's/ /\n/g' -e '$a\' \ # Substitute spaces with newlines in the url list and add a newline at the end ot the list (dialog doesn't put if for us)
|
|
|
+ | sed -e 's,^,'"${WEBSITE}"',' \ # Insert base url at the beginning of each line
|
|
|
+ | wget -i - --spider -r -l inf --no-parent --no-directories 2>&1 \ # Get url for all songs of the selected artists
|
|
|
+ | grep --line-buffered '^--' \
|
|
|
+ | stdbuf -oL cut -d' ' -f4 \
|
|
|
+ | grep --line-buffered '\.\(flac\|mp3\|wav\)$' \ # Select audio file types
|
|
|
+ | tee /dev/stderr \
|
|
|
+ | mpv --no-video --playlist=- "$@" # Start the party
|