Skip to content

mihaiolteanu/bash-lyrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lyrics - All the lyrics in one place.

Download and save the lyrics for the current playing song and interactively search and play the song from the saved database.

features

  • Multiple lyrics websites supported: screenshot1488633504
  • Download and save the lyrics for the current playing song (cmus and moc supported) screenshot1488637361
  • Alternatively, download the lyrics for a specified media file or for all media files in a folder (useful for creating a lyrics database) screenshot1488637443
  • Run in daemon mode so that the lyrics are automatically downloaded when you add new songs to your music folder screenshot1488633275
  • Select which websites to search first and in which order screenshot1488637524
  • Free-form search: search the lyrics as you would on google screenshot1488633027
  • 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

extra features for zaw

  • 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 screenshot1488632894
  • 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?!

install

dependencies

  • Arch Linux:
    sudo pacman -S id3v2 inotify-tools
    yaourt html-xml-utils
  • Ubuntu:
    sudo apt-get install id3v2 html-xml-utils inotify-tools

the application proper

    git clone https://github.com/mihaiolteanu/lyrics
    cd lyrics
    ./install.zsh

zaw plugin

  • antigen
    antigen bundle zsh-users/zaw
    antigen bundle mihaiolteanu/lyrics

usage and suggestions

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: screenshot1488637615

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")

issues

  • 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

Releases

No releases published

Packages

No packages published

Languages