I checked this code with "AM" album by Arctic Monkeys and it did sweetly. you can stop script execution at any time by pressing ctrl+ c.run the file (mind the quotes): ~/bin/lyrics_fetcher.sh "path/to/my album".add permission to run the file: chmod u+x ~/bin/lyrics_fetcher.sh.
install wget and eyeD3 with command sudo apt install wget eyed3.skipping!" # then lyrics aren't availableĮyeD3 -lyrics=eng:Lyrics:"$lyrics" "$file" 1>/dev/null If then # if it is $failure_messageĮcho "No lyrics found. Lyrics=$(wget -qO- $url) # make `wget` read the response from $url Song=$(eyeD3 -no-color "$file" | grep title)Īrtist="$" # replace `` with $title & cd "$1" # if argument provided, use it as working directory Someone have actually provided a lyrics API under the URL from this script and it works! ? #!/bin/bashįailure_message="Sorry, We don't have lyrics for this song yet." I encourage everyone who will use this code to look up their own lyrics website as exploiting the same service over and over can be considered malicious. in the following example I use eyeD3 to extract artist and title, then any WikiLirics-like web service to fetch lyrics and then eyeD3 again to add them as a tag. Tasks like this can be dealt with using simple bash scripts, e.g.
This is a semi answer as I don't know your environment and the code I provide is intended to serve as an example only - running it as is shouldn't do any harm but I can't give any guarantee.