
Lyricsdownloader for Conky
Source (link to git-repo or to original if based on someone elses unmodified work):
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
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
Ratings & Comments
60 Comments
Support for clementine-player would be great. thanks
hi... i've been having some issues lately with the lyrics, they were retrieved with some weird ASCII encryption or something... anyway i've inserted a little function to clean up that issue and to erase the "Send the song to your cell" lines... anyway here's the function: [pre] def cleanLyric(lyric): resp = lyric.lstrip() if resp.startswith('Send'): cell = resp.find('Cell') end = resp.find('<!--') if cell > 0: start = cell + 4 resp = resp[start:end] for i in range(32, 255): num = '%i'%(i) rep = '&#'+num+';' resp = resp.replace( rep, chr(i)) return resp [/pre] and i call it like this in line 635: text = cleanLyric(text) ...hope this helps anyone
Thanks for the update. I actually just fixed this the other day. I just hadn't packaged a new version yet. The weird characters are HTML entities, and they're converted to the real text in the latest version.
Would you update it soon for Audacious 2? thanks a lot.
I'll install Audacious 2 and see what I can do.
If i download a lyric whith å in it the text turns very strange example Lån etc...
I think this should be fixed with the newest version. Please let me know if it's not.
Doesn't work still getting those iso-latin-1(?) tokens.
It seams to have been even worse. Now doesn't even all english songs work. exapmle: http://lyrics.wikia.com/Flyleaf:I%27m_So_Sick doesn't
The lyrics are fetched from http://lyricwiki.org , I just wonder why there is no lyrics when listening to Chinese songs? I am sure the id3 tags of these songs are correct, and the lyrics are fetched flawlessly from http://lyricwiki.org with other lyric plugin for Audacious. Can this problem be fixed? thanks a lot.
Sorry to be responding so late, but could you point me to some of the songs that have problem lyrics so I can try to figure out what's going wrong?
There are no lyrics for all the Chinese songs, here are some for your reference. ???.mp3 ?????.mp3 ??.mp3 ?????.mp3 thanks.
I've made a few changes that I think should mostly work. You can try them out with this version of the script: http://lyricsdownloader.googlecode.com/svn/trunk/lyricsdownloader.py
version 0.9.8-svn shows no lyrics, no matter English or Chinese.
Hi great script. i wanted to know if there is a function to scroll because some lyrics are too long for my display. If not is it possible to print only the path of the downloaded lyric so i can make it scroll myself?
if you want i can give you an account of spotify.... and you can try it... :D it works normally just that every 30 days i have to open it in mi country ^^!
maybe it's posible add spotify in the program... i dont know how.. but with this script https://dl.getdropbox.com/u/206277/spotify_playing.sh (pidgin plugin) you can get the name of the song and the artist in spotify... :D
It should be possible. It looks like that script uses xwininfo to find the program spotify.exe running under wine and then gets the artist and songname from the window title. The only problems are that spotify isn't available in my country yet, but when it is, it shouldn't be too much of a problem.
Hi, when I go to download the 0.9.4 deb file I get this error that says: tmp/lyricsdownloader_0.9.4.deb could not be opened, because the associated helper application does not exist. Change the association in your preferences. What do I need to do to fix this? Thanks
You might be able to open a file browser to your /tmp directory and double click the file. If that doesn't work, the surest way would be to use the command 'dpkg -i tmp/lyricsdownloader_0.9.4.deb' from a root terminal or 'sudo dpkg -i tmp/lyricsdownloader_0.9.4.deb' if you're on a distribution that uses sudo. Please be sure to include your distribution if these suggestions don't work for you.
Those should have been 'dpkg -i /tmp/lyricsdownloader_0.9.4.deb' and 'sudo dpkg -i /tmp/lyricsdownloader_0.9.4.deb' respectively.
got it. thanks clicking on the file in /tmp worked
Is there a chance to achieve, that the lyrics text is centered?
This is kind of a hackish way to achieve what you want to do. I'll have to consider adding an alignment option for future revisions, but right now, you can change the final "else:" in the printLyrics command from: Quote: else: print '\n'.join(lyrics)
to:
Quote: else: print '\n'.join(map(lambda x: x.center(100),lyrics))
Sorry...but what is the "PrintLyrics"-command?