|
@@ -18,8 +18,21 @@
|
|
|
# Global Variables
|
|
|
PROGRAM_NAME="vaporget"
|
|
|
WEBSITE="https://vaporwave.ivan.moe/list/"
|
|
|
-USAGE="Usage: $PROGRAM_NAME [-pdh] [-m MPV_OPTION,...]"
|
|
|
MODE="play"
|
|
|
+USAGE="Usage: $PROGRAM_NAME [-pdh] [-m MPV_OPTION,...]"
|
|
|
+
|
|
|
+HELP_TEXT="$USAGE
|
|
|
+Get and play music from the Vaporwave Library Project.
|
|
|
+Play music with mpv(1) if none of -pd is specified.
|
|
|
+
|
|
|
+ -p only print selected URLs to standard output
|
|
|
+ -d donwload selected songs in current working directory
|
|
|
+ -m MPV_OPTION,... pass options to mpv(1)
|
|
|
+ -h print this extremely helpful text
|
|
|
+
|
|
|
+Exit Status:
|
|
|
+ 0 if OK,
|
|
|
+ 1 some errors occurred."
|
|
|
|
|
|
###############################################################################
|
|
|
# USEFUL FUNCTIONS #
|
|
@@ -94,7 +107,7 @@ while getopts pdm:h f; do
|
|
|
MPV_CMDLINE=$(echo "${OPTARG}" | sed -e 's/[[:space:]]//g' -e 's/[^,]\{2,\}/--& /g' -e 's/\(^\|,\)[[:alnum:]]\($\|,\)/ -& /g' -e 's/,//g')
|
|
|
;;
|
|
|
h)
|
|
|
- echo "${USAGE}" && exit 0
|
|
|
+ echo "${HELP_TEXT}" && exit 0
|
|
|
;;
|
|
|
\?)
|
|
|
echo "${USAGE}" && exit 1
|