FollieHiyuki-dotfiles/home/.local/bin/lyrics
2021-10-17 21:47:45 +07:00

17 lines
394 B
Bash
Executable File

#!/bin/sh
echo "Artist: " | tr -d '\n'
read -r artist
echo "Song: " | tr -d '\n'
read -r song
# Nice look
echo "========================
"
artist=$(echo "$artist" | sed s/" "/%20/g | sed s/"&"/%26/g | sed s/,/%2C/g | sed s/-/%2D/g)
song=$(echo "$song" | sed s/" "/%20/g | sed s/"&"/%26/g | sed s/,/%2C/g | sed s/-/%2D/g)
curl -s "https://api.lyrics.ovh/v1/$artist/$song" | jq -r ".lyrics"