https://github.com/mihaiolteanu/bash-lyrics
Save, search and play the lyrics
https://github.com/mihaiolteanu/bash-lyrics
cmus lyric-parser lyrics music zaw
Last synced: 8 months ago
JSON representation
Save, search and play the lyrics
- Host: GitHub
- URL: https://github.com/mihaiolteanu/bash-lyrics
- Owner: mihaiolteanu
- License: gpl-3.0
- Created: 2017-03-04T10:59:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-30T17:17:57.000Z (over 9 years ago)
- Last Synced: 2025-04-04T12:47:33.457Z (over 1 year ago)
- Topics: cmus, lyric-parser, lyrics, music, zaw
- Language: Shell
- Homepage:
- Size: 62.5 KB
- Stars: 28
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:

- 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
## extra features for zaw
- Install the [zaw](https://github.com/zsh-users/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?!
## install
### dependencies
- Arch Linux:
``` shell
sudo pacman -S id3v2 inotify-tools
yaourt html-xml-utils
```
- Ubuntu:
``` shell
sudo apt-get install id3v2 html-xml-utils inotify-tools
```
### the application proper
``` shell
git clone https://github.com/mihaiolteanu/lyrics
cd lyrics
./install.zsh
```
### zaw plugin
- antigen
``` shell
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:
``` shell
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](https://stumpwm.github.io/), 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:
``` common-lisp
(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:
``` common-lisp
(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