Lyricsdownloader for Conky

Conky

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

1
5 .0
Description:

This is a python script that will download lyrics for the song playing in Amarok 1.4x, Amarok 2, Rhythmbox, Audacious, Banshee, Exaile, Gmusicbrowser, Juk, Quod Libet, Listen, Songbird, Muine, Beep Media Player, and MPD and display the lyrics on your desktop with conky.

Both the deb and the tar include an example conkyrc file. The deb installs this in /usr/share/doc/lyricsdownloader/ .

For Amarok 2, Gmusicbrowser, Songbird, Audacious, Juk, BMP, Muine, Exaile, Listen, Quod Libet, Banshee or Rythmbox support, you need python-dbus installed. For MPD support, you must
have MPC also installed. Songbird also requires the extension 'dbusbird'. If you run this from your own conkyrc, make sure that text_buffer_size is set to a high enough value or the lyrics will be cut off. In the example conkyrc it's set to 6076.

If your favorite media player is not supported, leave a comment, and I'll see what I can do.

Requirements: python, beautifulsoup, python-dbus

NOTE: The album art in the screenshots is displayed with a separate superkaramba theme for Amarok 2. It's available here: http://kde-look.org/content/show.php/Amarok+2+Simple?content=93541
Last changelog:

11 years ago

0.9.7
This is just a small change, but it should fix most of the problems that people are having with the lyrics.

0.9.6
The previous version quit working because lyricwiki was forced to shut down their API. This version fetches the web page and scrapes it for the lyrics. There still may be bugs. This version requires the python module beautifulsoup. In Debian and Ubuntu, the package is called python-beautifulsoup.

This version also adds the options "--artist" and "--songname" which can be used to fetch lyrics independently of any music players.
0.9.4
Added an alignment option, -a or --align. To use, you need to specify a conky alignment variable to use. Example: lyricsdownloader -a '${alignc}'

The single quotes around the setting are important. Otherwise, the shell will try to expand the variable.

What this does is output '${alignc}' (or whatever you choose) in front of each line so it's necessary to use ${execpi} in your conkyrc.
0.9.3
This update adds some bug fixes for Amarok 1.x. It also adds several new options. Lyricsdownloader can now output other information from the player along with the lyrics, like the song name, duration, position, volume. You can even specify a template file to format the output.
0.9.0
This one is a big update. I added support for Muine and Beep Media Player. Theres also now command line options.
Some of the cool things you can do with these options are that you can point it at a particular MP3 file with the -f switch and it will download the lyrics for that song. You can use the -d switch and download the lyrics for all the songs in a directory. You can use the -o switch to tell it where to download the lyrics to. For example, you can enter a directory for a specific album and run 'lyricsdownloader -d -o .' and it will download the lyrics for that album and store them in that directory.
0.8.5
Added some things to help with debugging.
0.8.4
Should install on 64 bit now.
0.8.3
Version checking broke with the Amarok 2.0 release.
0.8.2
Initial Release

C

downdiagonal

11 years ago

Could you tell me what media player you're using, what errors you're getting and what happens when you just run the script from the command line with a song running? Like ~/.scripts/lyricsdownloader.py


Report

too5hort

11 years ago

Hi, im using Amarok, i type in the command
and the terminal thinks for 1sec and thet it returns me to jesper@ubuntu:~$.

And must the file be put in .scripts foler? mine is in home folder.

Report

C

downdiagonal

11 years ago

I set up a virtual machine running Amarok 1.4 and didn't have any problems. Could you run a couple more commands for me? Specifically:

pgrep amarokapp
dcop amarok player artist
dcop amarok player title

Could you also make sure that your songs have proper ID3 tags and check to see if the folder ~/.lyrics has been created.

Report

C

downdiagonal

11 years ago

It's fine that it's in your home folder. Could you tell me which version of amarok that you're using? I would prefer the output of the command: amarok --version. Also, is there now a .lyrics folder in your home directory? And if so, is there a file called missingsongs.txt in that directory?

Report

too5hort

11 years ago

Qt: 3.3.8b
KDE: 3.5.10
Amarok: 1.4.10

I am running ubuntu 8.10 and x64 bis proccessor if thats too any help.

Report

naaamo2004

11 years ago

yeah its really great, but its not working with quodlibet :(
is there something i have to change in the py-file? cause theres only amarok included.
i´m very very new in python, that´s why i don´t know where´s the problem.
but, how i said before, great script :D

Report

C

downdiagonal

11 years ago

You shouldn't have to change anything to get it to work with Quod Libet. Could you start up Quod Libet and start it playing something and run these commands and post the output?

pgrep quodli
quodlibet --print-playing

and try running the script from the command line and see if you get anything.

Report

naaamo2004

11 years ago

ive got it! whoooo thats pretty kewl.
i had to use the ubuntu installer and change the conky script, now its workin fine.
great job!!

Report

chunchengch

11 years ago

I like it, but there are some questions need to be clarified.

1. There is a .deb in the deb package, I think it is useless.

2. Some lyrics can not be downloaded, although they are actually in the album list, for example ABBA's Eagle, why does this happen?

3. Is there any limitation on the format of the file name of song?

Thanks!

Report

C

downdiagonal

11 years ago

Thanks. I'm glad you like it. Regarding your questions:

1. Yes, that was an accident. It won't be included in future versions. It doesn't do anything, but you can remove it with rm /.deb

2. I would check to make sure the id3 tags are correct on those songs. It downloads lyrics from lyricwiki.org so it won't find every song, but it should find Eagle by ABBA. Also, if you find a song that there aren't lyrics for, you can always go and add them to the site yourself so they display next time you listen. I'm looking into adding support for getting the lyrics from some other sites also.

3. The filename of the song shouldn't matter at all. You could have a song called 96248b0a99c83.mp3 and it will find the lyrics if the id3 tags are accurate.

Report

11 years ago

0.9.7
This is just a small change, but it should fix most of the problems that people are having with the lyrics.

0.9.6
The previous version quit working because lyricwiki was forced to shut down their API. This version fetches the web page and scrapes it for the lyrics. There still may be bugs. This version requires the python module beautifulsoup. In Debian and Ubuntu, the package is called python-beautifulsoup.

This version also adds the options "--artist" and "--songname" which can be used to fetch lyrics independently of any music players.
0.9.4
Added an alignment option, -a or --align. To use, you need to specify a conky alignment variable to use. Example: lyricsdownloader -a '${alignc}'

The single quotes around the setting are important. Otherwise, the shell will try to expand the variable.

What this does is output '${alignc}' (or whatever you choose) in front of each line so it's necessary to use ${execpi} in your conkyrc.
0.9.3
This update adds some bug fixes for Amarok 1.x. It also adds several new options. Lyricsdownloader can now output other information from the player along with the lyrics, like the song name, duration, position, volume. You can even specify a template file to format the output.
0.9.0
This one is a big update. I added support for Muine and Beep Media Player. Theres also now command line options.
Some of the cool things you can do with these options are that you can point it at a particular MP3 file with the -f switch and it will download the lyrics for that song. You can use the -d switch and download the lyrics for all the songs in a directory. You can use the -o switch to tell it where to download the lyrics to. For example, you can enter a directory for a specific album and run 'lyricsdownloader -d -o .' and it will download the lyrics for that album and store them in that directory.
0.8.5
Added some things to help with debugging.
0.8.4
Should install on 64 bit now.
0.8.3
Version checking broke with the Amarok 2.0 release.
0.8.2
Initial Release

12345678910
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
jameshardy88
May 01 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.9.7
updated Aug 11 2009
added Dec 02 2008
downloads 24h
0
mediaviews 24h 0
pageviews 24h 0