Amarok LyricWiki.org 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

1
5 .0
Description:

A simple script to retrieve lyrics from LyricWiki.org and display them on the Lyric tab of the context browser. Now you can enjoy having lyrics that can be fixed when incorrect!

As of v2.0 this script now utilizes the LyricWiki.org SOAP API. In the short term this means more reliable results in a shorter time frame. In the long run (future versions) it means being able to edit, update, or add lyrics and albums to LyricWiki directly from Amarok.

Note: In version 2.0 special characters are not displayed properly. This is a problem with the SOAP service and not a problem in the script.

Requires:
Amarok 1.4
Ruby 1.8
QtRuby (Optional)

Note: Kubuntu users should be able to install QtRuby with the following command:
sudo apt-get install libqt0-ruby1.8

Comments and suggestions are appreciated.
Last changelog:

13 years ago

v2.0
====

* New: LyricWiki.org's SOAP API has been implemented, improving performance and reliability.
* Bugfix: Search results no longer yeild duplicate song entries.
* Bugfix: Script will check bands starting with "The" by switching the order when using SOAP. Ex: "The Used" will also try searching for "Used, The"

v1.2
====

* Bugfix: Suggestions when no exact match is found should now function reliably.
* Bugfix: Following page redirects would sometimes fail due to spaces in song or artist names.
* Bugfix: Search results no longer yeild links to albums.

v1.1
====

* Bugfix: Missing QTRuby is now handled by the error handling.
* Bugfix: Bug in removal of category information may have truncated lyrics.
* Package fix: Script is now tarred as a directory for easier removal/update.

v1.0
====

* New: Error Handling. The script should no longer crash if unable to connect to LyricWiki.org.
* New: LyricWiki's page redirects are now automatically followed.
* New: Attempts to both find lyrics with case of ID3 tag characters unmodified and with the first letters of words capitalized before searching.
* Bugfix: Category information was sometimes displayed with lyrics.
* Bugfix: Empty lines before and after the lyrics are now removed.

See the full changelog in the About dialog found in Amarok's Script Manager.

bitcrazy

14 years ago

Hi,
seems, that your script now removes all apostrophes from the lyrics.

Greetings

m0nk

Report

C

Rede

14 years ago

Just uploaded 0.6.1. Installing that will fix the apostrophe problem.

Report

C

Rede

14 years ago

whoops, sorry. gotta sleep now but ill fix this in the next couple of days.

Report

panzi

14 years ago

I didn't look, maybe you already do it that way, but you can export xml-data from a mediawiki and read it with a xml-lib.
e.g.: http://lyricwiki.org/index.php?title=Special:Export/New_Model_Army:Vagabonds

Newlines are not stripped, mozilla/firefox just displays a xml-file that way. Click "view source".

(I have to change my lyriki script so it uses this, too.)

Report

C

Rede

14 years ago

thanks for the tip, that gives me a new project. it will let me get more experience with xml and ruby, which is a plus... whenever I get a day or two off work.

Report

schtroumpf

14 years ago

ok thanks for your work for those who can not wait the new version here comes a ugly patch for the flag :
51,54c51,59
< if urlsource.index('') != nil
< lyricsslicestart = urlsource.index('') + 5
< if urlsource.index('') != nil
< lyricssliceend = urlsource.index('') - 1
---
> if urlsource.index(/|/) != nil
> if(urlsource.index('') != nil)
> lyricsslicestart = urlsource.index('') + 5
> else
> lyricsslicestart = urlsource.index('') + 16
> end
>
> if urlsource.index(/|/, lyricsslicestart) != nil
> lyricssliceend = urlsource.index(/|/, lyricsslicesta rt) - 1


( sorry I can't remember my ftp password to upload the patch ;-) )

Report

schtroumpf

14 years ago

Oops sorry ! It seems Kde-apps think I am a hacker :). You must wait for the next version then.

Report

panzi

14 years ago

Well, mediawikis are XHTML and therefore XML anyway, so I use xml.dom to parse the lyriki site, but the xml-export site has much cleaner xml, and data only -> faster.

Report

dec0ding

14 years ago

working here and I love it!

Wiki's are great! Didn't know about LyricWiki by the way ;)

Report

panzi

14 years ago

Yet another mediawiki-based lyrics site?
Well, they don't have all new model army lyrics. I fix that. :)

Report

dbd

14 years ago

Works fine for me, I love wikis :)

I inititially thought this had been already done, but the other script was for lyriki.com. Thanks for pointing out LyricWiki.org, it seems to have FAR more lyrics that lywiki.com, and I was about to start adding all my faviourite tracks that were missing from lywiki.com. But it seems lyriki.com already has loads of them :D

Report

urmelchen

14 years ago

.. doesn't work for me:

~/.kde/share/apps/amarok/scripts/lyrics_lyricwiki/lyrics_lyricwiki.rb:46:in `parseLyrics': undefined method `+' for nil:NilClass (NoMethodError)
from ~/.kde/share/apps/amarok/scripts/lyrics_lyricwiki/lyrics_lyricwiki.rb:222
from ~/.kde/share/apps/amarok/scripts/lyrics_lyricwiki/lyrics_lyricwiki.rb:196

Whats wrong?

Report

C

Rede

14 years ago

Very strange. Somehow you arrived at a page without html title tags.

Can you let me know what you were trying to listen to so i can figure out what exactly is happening? Did you get that message after clicking a suggested lyric when there was no exact match, or was it found on an exact match? I can't seem to recreate the problem, so please let me know. The only guess I have is that the server may not have responded, because even error pages on LyricWiki.org have title tags.

In the meantime, I'll make sure it gives an error message instead of crashing as a result of that error, but I'd obviously prefer to know exactly what is causing it. That way I can either avoid it altogether or at least explain the cause in the error message.

By the way, thanks for alerting me to this problem.

Report

urmelchen

14 years ago

Okay, with 0.4 it seems to work for me. Anyway, thanks for this nice skript :-)

Report

13 years ago

v2.0
====

* New: LyricWiki.org's SOAP API has been implemented, improving performance and reliability.
* Bugfix: Search results no longer yeild duplicate song entries.
* Bugfix: Script will check bands starting with "The" by switching the order when using SOAP. Ex: "The Used" will also try searching for "Used, The"

v1.2
====

* Bugfix: Suggestions when no exact match is found should now function reliably.
* Bugfix: Following page redirects would sometimes fail due to spaces in song or artist names.
* Bugfix: Search results no longer yeild links to albums.

v1.1
====

* Bugfix: Missing QTRuby is now handled by the error handling.
* Bugfix: Bug in removal of category information may have truncated lyrics.
* Package fix: Script is now tarred as a directory for easier removal/update.

v1.0
====

* New: Error Handling. The script should no longer crash if unable to connect to LyricWiki.org.
* New: LyricWiki's page redirects are now automatically followed.
* New: Attempts to both find lyrics with case of ID3 tag characters unmodified and with the first letters of words capitalized before searching.
* Bugfix: Category information was sometimes displayed with lyrics.
* Bugfix: Empty lines before and after the lyrics are now removed.

See the full changelog in the About dialog found in Amarok's Script Manager.

12345678910
Be the first to comment
ngrocott
Dec 09 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
2.0
updated Nov 04 2007
added May 24 2006
downloads 24h
0
mediaviews 24h 0
pageviews 24h 3
System Tags addon