Download and save the lyrics for the current playing song and interactively search and play the song from the saved database.
- Multiple lyrics websites supported:
- Download and save the lyrics for the current playing song (cmus and moc supported)
- Alternatively, download the lyrics for a specified media file or for all media files in a folder (useful for creating a lyrics database)
- Run in daemon mode so that the lyrics are automatically downloaded when you add new songs to your music folder
- Select which websites to search first and in which order
- Free-form search: search the lyrics as you would on google
- Remove live, demo and other such strings from the song title for a higher success rate
- Outputs the file name to stderr if no lyrics were found. Can be used to generate a log when searching for lyrics in folders
- Install the zaw lyrics plugin and you can search all the lyrics from the database with a
live filter using
zaw-lyrics-search
. Accepting the search plays the song in your media player (cmus and moc supported). Alternatively, search the song on youtube - Search and filter artists from the database interactively using
zaw-artist-search
. Selecting the artist opens the the artist page on last.fm - Any other zaw magic to be had?!
- Arch Linux:
sudo pacman -S id3v2 inotify-tools
yaourt html-xml-utils
- Ubuntu:
sudo apt-get install id3v2 html-xml-utils inotify-tools
git clone https://github.com/mihaiolteanu/lyrics
cd lyrics
./install.zsh
- antigen
antigen bundle zsh-users/zaw
antigen bundle mihaiolteanu/lyrics
The lyrics
application creates a local database where it saves the lyrics after each succesful search, minus the free-form
searches (google-like) as in these cases, the artist and song name are not known with 100% certainty.
Google searches would have been best, as it speeds up the process tremendously, but google doesn't want that. Use it at your
own peril as you might get blacklisted from too many searches. I think darklyrics and azlyrics might do that too. The
alternative is to search each website in turn, until a result is found. This is slow, so pick your most likely sources
beforehand, using the -w option, or by exporting the LYRICS_WEBSITES
enviornment variable. See the -h
(help) option for
info.
If you're using the zaw plugin, a keybinding is really helpful for quick access:
bindkey '^xml' zaw-lyrics-search
bindkey '^xma' zaw-artist-search
That's Ctrl+x m l or a. While filtering, press tab key for alternate actions (like youtube search).
If you're using stumpwm, you can display the lyrics for the current playing song in a nice little window:
Add this to your ~/.stump.d/init.lisp
file, for example:
(defcommand player-lyrics () ()
(message-no-timeout (run-shell-command "lyrics" t)))
Start the daemon at system startup. I'm using stumpwm init files again for this purpose:
(run-shell-command "lyrics -d ~/music")
- Still buggy
- Doesn't play well with special characters
- Some lyrics websites might return garbage and that is what is saved in the database (not good)
- Parsing errors galore, including missing html tags, empty variables and the like leading to errors from awk and friends