You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
747 B
Bash

#!/usr/bin/env bash
# AUTHOR: gotbletu (@gmail|twitter|youtube|github|odysee)
# https://www.youtube.com/user/gotbletu
helpmsg() {
printf "%s\n" "desc: search for video game soundtracks and download (https://downloads.khinsider.com)"
printf "%s\n" "demo: https://youtu.be/ZSIJdNQBoJw"
printf "%s\n" "depend: fzf khinsider (https://github.com/obskyr/khinsider)"
printf "\n"
printf "%s\n" "usage: ${0##*/} <keywords>"
}
if [ $# -lt 1 ]; then
helpmsg
exit 1
elif [ "$1" = -h ] || [ "$1" = --help ]; then
helpmsg
exit 0
else
selected="$(khinsider -s "$@" | tail -n +2 | fzf -e -i -m)"
[ -z "$selected" ] && exit
echo "$selected" | while read -r line ; do printf "%s\n" ">>> $line" && khinsider -f mp3 "$line" ; done
fi