Wiki-Lyrics

Amarok 1.x Scripts

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

0
5 .0
Description:

A lyrics script to interface with various sites and, optionally, submit content to Lyriki.com or LyricWiki.org (wikis for lyrics). Lyrics can be searched on multiple sites according to a configurable priority.

Supported sites:
- Lyriki (www.lyriki.com)
- LyricWiki (www.lyricwiki.org)
- AZ Lyrics (www.azlyrics.com)
- Baidu MP3 (mp3.baidu.com)
- Dark Lyrics (www.darklyrics.com)
- Giitaayan (www.giitaayan.com)
- Jamendo (www.jamendo.com)
- Leos Lyrics (www.leoslyrics.com)
- Lyrc (lyrc.com.ar)
- Lyrics Download (www.lyricsdownload.com)
- Lyrics Mania (www.lyricsmania.com)
- Not Popular (www.notpopular.com)
- Seek Lyrics (www.seeklyrics.com)
- Sing365 (www.sing365.com)
- Terra Letras (letras.terra.com.br)

Dependencies:
- Amarok 1.4
- Ruby 1.8
- QtRuby, Ruby/GTK or Ruby/Tk

Translators wanted:
If you want to help, translate the script into your language and send me the result
(take a look at the i18n folder and ask if you need any help).


Important!!
The settings file format changed in version 0.13.2 so the old file must be removed when upgrading from versions of the script older than that one. Running the following command should take care of it:
rm $HOME/.kde/share/apps/amarok/scripts-data/wikilyrics.xml
Last changelog:

11 years ago

Version 0.13.4
- [Fix] update LyricWiki plugin to match site change
- [Fix] update Jamendo plugin to match site changes

Version 0.13.3
- [Change] search dcop program on predefined locations if not found in PATH (*)
- [Fix] update Sing365 plugin to match site changes
- [Fix] bug in Jamendo plugin removed line break from lyrics

(*) Fixes the script when using Amarok 1.4 on KDE4 with Gentoo (and probably other distros too)

Version 0.13.2
- [New] the script can now spawn threads to handle Amarok messages
- [New] added option to disable using threads (Ruby threads are not battery/power friendly...)
- [New] removed all unnecessary usage of threads (parsing Amarok messages, Tk GUI backend)
- [Fix] check if song page exists before attempting to submit it (wiki plugins)
- [Fix] relogin when session expires (wiki plugins)
- [Fix] parsing of suggestions in wiki plugins
- [Fix] update Dark Lyrics plugin to match site changes
- [Fix] update Jamendo plugin to match site changes
- [Fix] update Lyrics Download plugin to match site changes
- [Fix] update Seek Lyrics plugin to match site changes
- [Change] replaced NotPopular.com plugin with LoudSon.gs plugin (NotPopular.com site lyrics now point to LoudSon.gs)
- [Change] removed Lyrc plugin as site has been down for more than a month
- [Change] removed Baidu MP3 plugin as site no longer provides lyrics

cyrus007

13 years ago

I will check it out once I am at home.
In fact your solution got me thinking, why not replace the itrans executable with Ruby code the other way from what you have done. You will just need the .ifm file and peek into the itrans source to find out how it works. That way we don't have to worry about platform issues.

Report

C

attendant

13 years ago

that will be great. it just seems to me that implementing the itrans to devanagari conversion is not a trivial task. the conversion from devanagari to itrans i implemented is rather poor (making it right would require a far greater understanding of the issue than mine, and a lot more time too). is only somewhat useful because, from a user point of view, it operates under the hood (the user doesn't get to see those pitiful itrans results...). the inverse conversion is what the user ends up seeing, so it would have to be better than that (if that wasn't the case, i would have simply reversed my algorithm).
anyway, you do probably have a much better understanding of this than me. if you feel like doing it, it would be very useful.

Report

zefo

13 years ago

malformed UTF-8 character
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/lyrics_lyrc.rb:35:in `unpack'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/lyrics_lyrc.rb:35:in `build_lyrics_fetch_data'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/lyrics.rb:112:in `lyrics_direct_search'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/lyrics.rb:293:in `lyrics_full_search'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/metalyrics.rb:81:in `lyrics_from_other_scripts'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/metalyrics.rb:77:in `each'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/metalyrics.rb:77:in `lyrics_from_other_scripts'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/metalyrics.rb:71:in `on_lyrics_not_found'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/lyrics.rb:303:in `lyrics_full_search'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/wikilyricssubmitter.rb:39:in `lyrics_full_search'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/amarokmetalyrics.rb:91:in `show_lyrics_full_search'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/amarokmetalyrics.rb:141:in `on_fetch_lyrics'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/amarokmetalyrics.rb:272:in `run_worker'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/amarokmetalyrics.rb:256:in `loop'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/amarokmetalyrics.rb:256:in `run_worker'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/amarokmetalyrics.rb:212:in `main'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/amarokmetalyrics.rb:209:in `initialize'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/amarokmetalyrics.rb:209:in `new'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/amarokmetalyrics.rb:209:in `main'
/home/user/.kde/share/apps/amarok/scripts/wiki_lyrics/amarok_lyricwiki.rb:44

Report

C

attendant

13 years ago

do you know the artist and song that produced this error?

Report

zefo

13 years ago

sure. the interpret name is: Záviš, the songname is Starý kokot. you can see lyricwiki entry here: http://lyricwiki.org/Záviš:Starý_kokot

Report

cyrus007

13 years ago

First of all, good work but I have two things to comment.
1) I found it to be a bit slow in fetching lyrics. Default setting was leos-lyrics with others having lower priority. It would take > 5secs in some cases where default lyrc script takes < 2secs for the same song. Maybe object manipulation / instantiation takes some time for each song.
2) I had difficulty in understanding it to extend it to implement something like http://www.kde-apps.org/content/show.php?content=50890
Do you have a template to extend it ?

Report

C

attendant

13 years ago

1) I found it to be a bit slow in fetching lyrics. Default setting was leos-lyrics with others having lower priority. It would take > 5secs in some cases where default lyrc script takes < 2secs for the same song. Maybe object manipulation / instantiation takes some time for each song.

No, that has to do with the main site (Leos Lyrics) and fallback sites your using (and their loads at that time).
After the script initialization is done (only once, unless you start and stop the script for every song...) the time taken to fetch the lyrics is always the main factor (even if the rest of the algorithms involved were really slow, their impact would still be negligible).
If you want to compare speeds use Lyrc as main site without any fallback sites (you shouldn't see big differences then).

2) I had difficulty in understanding it to extend it to implement something like http://www.kde-apps.org/content/show.php?content=50890
Do you have a template to extend it ?

There's mainly 1 file you should be looking at: lyrics.rb. That file has the functionality common to all the lyrics scripts and even some (not very useful) comments. That should give you some understanding of how things work.
To add support for other site all you need is extend the Lyrics class implementing the missing (or stub) methods (the rest of the magic is already done separately). This is what all the files named lyrics_*.rb do. You should have a look at them and modify the one that suits your needs best (stay away from lyrics_lyriki.rb or lyrics_lyricwiki.rb since they do more complicated things you probably won't need).
If you get that far, all that remains is cloning one of the amarok_*.rb (don't worry, there's not much to change there) and adding the spec file.

Anyway, good luck. I'll try to add a small (but clearer) guide on how to add support for other sites for the next release.

Report

cyrus007

13 years ago

OK, played around with it and extended it to fetch lyrics of hindi songs. It is available at http://www.swapsphoto.com/swapscomp.html

Report

bearcatsandor

13 years ago

This is one of the best scripts for Amarok i have seen yet. Being able to download and submit lyrics so easily is fantastic.

Report

Kopfgeldjaeger

13 years ago

it works great on gnome, too! ubuntu edgy x64, amarok rulez! i just had to install libqt0-ruby1.8

Report

dominik

14 years ago

hi again ;)
the script seems to crash on umlauts or apostrophe. on some songs of "Die Ärzte" it crashes with following backtrace:
GTK bindings not found
/usr/lib64/ruby/site_ruby/1.8/glib2.rb: line 55
GLib-GObject-CRITICAL **:g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
/usr/lib64/ruby/site_ruby/1.8/glib2.rb: line 55
GLib-GObject-CRITICAL **:g_param_spec_boxed: assertion `G_TYPE_IS_BOXED (boxed_type)' failed
/usr/lib64/ruby/site_ruby/1.8/glib2.rb: line 55
GLib-GObject-CRITICAL **:g_object_class_install_property: assertion `G_IS_PARAM_SPEC (pspec)' failed
/usr/lib64/ruby/site_ruby/1.8/glib2.rb: line 55
GLib-GObject-CRITICAL **:g_param_spec_boxed: assertion `G_TYPE_IS_BOXED (boxed_type)' failed
/usr/lib64/ruby/site_ruby/1.8/glib2.rb: line 55
GLib-GObject-CRITICAL **:g_object_class_install_property: assertion `G_IS_PARAM_SPEC (pspec)' failed
malformed UTF-8 character/home/dkey/.kde/share/apps/amarok/scripts/lyriki-lyrics/lyrics_lyrc.rb:30:in `unpack'
/home/dkey/.kde/share/apps/amarok/scripts/lyriki-lyrics/lyrics_lyrc.rb:30:in `artist_and_title_to_url'
/home/dkey/.kde/share/apps/amarok/scripts/lyriki-lyrics/lyrics.rb:60:in `lyrics_by_title'
...

thx!

Report

dominik

14 years ago

could it be that the script doesn't work any more with current amarok? it stops right after starting here.

thanks!

Report

C

attendant

14 years ago

I don't have this problem using 2006/11/12 svn. could you provide additional info?

Report

dominik

14 years ago

removing qtruby and using ruby-gtk fixed the problem!

thx for this great script!!

Report

dominik

14 years ago

thx for your reply!

I get this error:
$ ruby lyriki.rb -a "Green Day" -t "Reject"
Searching lyrics to 'Reject' by 'Green Day'...
Lyrics to 'Reject' by 'Green Day' found.


/usr/lib64/ruby/site_ruby/1.8/Qt/qtruby.rb:1367: [BUG] Segmentation fault
ruby 1.8.5 (2006-08-25) [x86_64-linux]

Abgebrochen

I re-emerge ruby(1.8.5) as well as qtruby(3.5.5) but it didn't help.

Report

Sahir

14 years ago

I have a problem with this script:
Although it used to work before, now it finds the lyrics, a popup window asks me to submit them to lyriki.com.
But after submitting I get an error "[Lyriki] there was an error submitting the song page"
Any ideas?
Using Suse Linux 10.1
Amarok 1.4.4
Lyriki-Lyrics v0.8

Report

C

attendant

14 years ago

this should be fixed in version 0.8.1.
please, test and report back.

regards

Report

Sahir

14 years ago

Tried it now with a few songs, it works.
Thank you :)

Report

Sahir

14 years ago

Great Thanks :)
I'm at university atm, but I'll try it this evening at home and tell you if it worked.

Report

WPosche

14 years ago

I have some lyrics already saved in my files. The lyriki script only uploads those that are not on the lyriki server, but that it downloads from other sites. Yet it doesn't add the lyrics which are already saved on my hard disk.

Any chance of implementing that functionality in a later version? Of course, it should double check if there is only a spelling mistake in order to not add to many doble entries. With this it should be quite sensitive.

Report

C

attendant

14 years ago

I have some lyrics already saved in my files.
do you mean on the files metadata?

The lyriki script only uploads those that are not on the lyriki server, but that it downloads from other sites. Yet it doesn't add the lyrics which are already saved on my hard disk.
if the lyrics are stored locally somewhere amarok can find them, it (smartly) won't request the lyrics to the running script (or at least that's the case with cached lyrics... i don't know how it handles lyrics in metadata). to work around this, press the refresh button on the lyrics tab or clear the lyrics cached on amarok database.

Any chance of implementing that functionality in a later version? Of course, it should double check if there is only a spelling mistake in order to not add to many doble entries. With this it should be quite sensitive.
you lost me here. i don't understand what you're asking but if it involves spell checking, you might be losing contact with reality :)

Report

WPosche

14 years ago

>do you mean on the files metadata?

Well, I guess amarok saves them to the ID3v2 tags of the files. I added them myself on amarok. So if you mean the ID3 tags with metadata, then yes.

>if the lyrics are stored locally somewhere amarok can find them, it (smartly) won't request the lyrics to the running script (or at least that's the case with cached lyrics... i don't know how it handles lyrics in metadata). to work around this, press the refresh button on the lyrics tab or clear the lyrics cached on amarok database.

I want the lyrics that are saved in the ID3 tags of my files (or in the amarok cache) to be uploaded to the lyriki webpage, in case the plugin does not find these lyrics to be already on the lyriki webpage.

Maybe this might clarify:
1. check if lyrics are already available in the ID3 tag/or in amarok cache
2. if they are available, check if the lyriki page already knows these lyrics
3. if lyriki does not already have the same lyrics, automatically upload them


The reference to spell checking was only concerning the checking if the lyrics already exist in the lyriki database. E.g.
1. Playing song: Pearl Jam - Present tense and lyrics are in amarok cache
2. in the lyriki database, there is only a Pearl Jam - Present Tense file
3. don't upload it, because chances are it is the same song.

Report

saladasalad

14 years ago

Great script, I've been using the auto-submission tool to add heaps of lyrics to Lyriki. The only problem is that everytime I submit lyrics the script turns off and I have to restart it in the script manager. I'm using the 'review before submitting' option and I'm on Kubuntu Dapper.

Report

dotancohen

14 years ago

How do I get to the script configuration dialog? In Script Manager -> Options (translated) nothing pops up. And I do not see any other places whereby I might get to it.

Thanks.

Dotan Cohen

Report

C

attendant

14 years ago

you are probably missing qtruby, ruby-gtk and ruby-tk (you need at least one of those). still, you should be seeing an error message (if you don't see it there's probably a bug). please, try v0.8 and report back.

Report

11 years ago

Version 0.13.4
- [Fix] update LyricWiki plugin to match site change
- [Fix] update Jamendo plugin to match site changes

Version 0.13.3
- [Change] search dcop program on predefined locations if not found in PATH (*)
- [Fix] update Sing365 plugin to match site changes
- [Fix] bug in Jamendo plugin removed line break from lyrics

(*) Fixes the script when using Amarok 1.4 on KDE4 with Gentoo (and probably other distros too)

Version 0.13.2
- [New] the script can now spawn threads to handle Amarok messages
- [New] added option to disable using threads (Ruby threads are not battery/power friendly...)
- [New] removed all unnecessary usage of threads (parsing Amarok messages, Tk GUI backend)
- [Fix] check if song page exists before attempting to submit it (wiki plugins)
- [Fix] relogin when session expires (wiki plugins)
- [Fix] parsing of suggestions in wiki plugins
- [Fix] update Dark Lyrics plugin to match site changes
- [Fix] update Jamendo plugin to match site changes
- [Fix] update Lyrics Download plugin to match site changes
- [Fix] update Seek Lyrics plugin to match site changes
- [Change] replaced NotPopular.com plugin with LoudSon.gs plugin (NotPopular.com site lyrics now point to LoudSon.gs)
- [Change] removed Lyrc plugin as site has been down for more than a month
- [Change] removed Baidu MP3 plugin as site no longer provides lyrics

12345678910
Be the first to comment
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.13.4
updated Mar 12 2009
added Feb 11 2006
downloads 24h
0
mediaviews 24h 0
pageviews 24h 6
System Tags addon