-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    LinuxDaily.com    Linux42.org    OpenSkillz.com   
 
Apps
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login


Sponsoring


-
- Content .- Fans  .- Knowledge Base  . 

Ruby Lyric Parser

   1.3  

Amarok Script

Score 72%
Ruby Lyric Parser
zoom


Downloads:  158
Submitted:  Aug 5 2008
Updated:  Aug 17 2008

Description:

-- About --
RLP is a lyric fetching script for Amarok written in Ruby.

The RLP philosophy:
1) Keep the number of search engines to a minimum.
2) Use the best search engines.
3) Search effectively and efficiently.

Search Engines (in order of search priority):
1) LyricWiki - a reliable, well-maintained, and constantly updated lyric site
2) JustSomeLyrics - good for less popular music (not found on LyricWiki)

__Basic Search Algorithm Description__
Processing Artist/Song Data:
1) Artist and song data are first "processed"; this involves stripping any useless/junk characters that would otherwise prevent useful search results.
2) Original artist and song data are still preserved. In the event that a search with the processed info fails, we'll try it again but with the unprocessed data.
3) Adding to 2... RLP will retry only if all the following conditions hold true:
- The processed and unprocessed song information differs
- retry is set to true in configuration options
- The search method itself is set to retry (as defined by me)

LyricWiki Search Methods:
1) Guess the song url: This method "guesses" the song url from the song/artist data. So, if the meta tags on your music are accurate, then you'll have no problems getting lyrics.
2) Google search: This method searches google using the song/artist data and grabs the first search result. It then checks the "type of page it retrievied:
- If it's a song page, return the lyrics
- If it's the artist's main page or an album page, find the song link from the page

JustSomeLyrics Search Methods:
1) Google search: This method searches google using the song/artist data and grabs the first search result.

-- Benefits of RLP --
1) I actively develop and constantly test my code (see the Test Cases suite I've included in debug.rb).
2) The general trend with lyrics scripts seems to be: "more search engines = better results"
I disagree, and instead believe: "more search engines = bloated and slow script that searches ineffectively"
3) I'm open to suggestions (see Contact information below).

-- Configuration --
The configuration is located at the top of lyric_parser.rb, and is quite minimal (and in my opinion, not needed).

-- Dependencies --
Ruby 1.8 (ruby1.8)
Standard Ruby Libraries (libruby1.8)
kdebase-bin (for error notifications)

-- Contact --
Having trouble getting lyrics for a song even though it's on one of the above search engines?
Know a better lyric search engine that I should include in future releases?

By all means, email me about it, and I'll consider implementing it.
Email: chocomoojuice@gmail.com




Changelog:

Version 1.3
Date: Sunday, August 17th, 2008
> Fixed a bug where LyricWiki lyric pages obtained from "guessing" the song url weren't being recognized as successful (and therefore skipped)
> Improved algorithm for LyricWiki google search; RLP now checks what type of page the first google hit is:
1. If it's the song page, return the lyrics on that page (this was the default behaviour before)
2. If it's the artist's main page or an album page, find the link to the song from it
> Added another search method to the LyricWiki parser:
1. Guess the artist page
2. If successful, find the song link from the page
> Made many more functions for my html parsing library, and improved the functionality of some already existing ones
> Organized my code into more sensible file locations
> Considered implementing another parser (SongLyricsCollection.com); however, after extensive testing of the beta parser, I found that in addition to having a low lyric yield on search attempts, the way in which this site formats it's URL's and even lyric pages is extremely inconsistent

Version 1.2
Date: Saturday, August 9th, 2008
> Fixed a bug where library files I made (page.rb, lyric_parser_implementations.rb) were showing up in the script manager [thanks to pejakm for pointing that out]
> Gave an html makeover to the About information
> Changed the "Powered by" message at the bottom of lyric fetches

Version 1.1
Date: Monday, August 6th, 2008
> Fixed a minor bug that would've broken the retry facility if I added another parser.
> Added error handling for missing Ruby libraries (but kdebase-bin must be installed for them to display, sorry gnome users)
> Added dependency list to description

Version 1.0
Date: Monday, August 4th, 2008
> Initial release.




LicenseCreative Commons by
(Ruby Lyric Parser)
Send to a friend
Subscribe
Other  Apps  from chocomoojuice
Report inappropriate content



-
.

 Cool!

 
 by reggler on: Aug 5 2008
 
Score 50%

Works GREAT!
Gets lyrics i haven't found with other scripts!

Cool,
Thanks!


chEErs roN
Reply to this

-

 Re: Cool!

 
 by chocomoojuice on: Aug 6 2008
 
Score 50%

Thanks for the feedback, and enjoy!


- James
Reply to this

-

 i must sigh

 
 by skaar on: Aug 6 2008
 
Score 50%

it no work. get two items, on a page.rb......thing. and it repeatedly crashes.


Reply to this

-

 Re: i must sigh

 
 by chocomoojuice on: Aug 6 2008
 
Score 50%

Please post amarok's error message and tell me the track/artist that you experience a crash from, and I will look into it right away.


Reply to this

-

 Re: i must sigh

 
 by chocomoojuice on: Aug 6 2008
 
Score 50%

I believe your problem may be that you don't have some standard Ruby libraries installed (libruby1.8).
I've now added error notifications for this, so if you try installing the newest version and running it, you should get an error dialog to confirm this.


- James
Reply to this

-

 Re: Re: i must sigh

 
 by skaar on: Aug 8 2008
 
Score 50%

i eventually figured out what was wrong, i was trying to run the wrong thing, there's extraneous entries, i was trying to run them.
http://img.photobucket.com/albums/v413/sKaar/oddstuff/ruby-buggery.png
and it appears to work, well enough, except that it didn't pick up my ray stevens stuff.


Reply to this

-

 Re: Re: Re: i must sigh

 
 by skaar on: Aug 8 2008
 
Score 50%

didn't work for mel torme either, but it dug up orgy and green jelly just fine.


Reply to this

-
.

 Re: Re: Re: Re: i must sigh

 
 by chocomoojuice on: Aug 10 2008
 
Score 50%

I'll do my best to make sure the next release can find these artists for you.


James
Reply to this

-

 A question...

 
 by pejakm on: Aug 8 2008
 
Score 50%

Great script, but I have a question:

what is this, and is it really neccessary?
http://www.filehive.com/files/080808/wh.png


Reply to this

-
.

 Re: A question...

 
 by chocomoojuice on: Aug 9 2008
 
Score 50%

Thanks for the feedback.
Excellent point, that shouldn't be there (apparently I'm blind). It's been fixed in the newest release.


James
Reply to this

-
.

 Wow it works!

 
 by BorgQueen on: Aug 10 2008
 
Score 50%

Other than the stock lyric tools, none have worked well for me. This does a great job. I have to clean up the lyrics in the edit information but at least I actually have them. Even for the hard to find stuff.

Thanks!


Reply to this

-
.

 Progress

 
 by chocomoojuice on: Aug 10 2008
 
Score 50%

I'm currently working on extending my html parsing library. What this means for you guys is that I'll be able to add more search engines, and I should be able to implement them quite fast.
In terms of search engines to add, I'm considering sing365.com, but am not entirely decided. Do you guys have any favourite lyric databases that you think I should add in the next release?


Reply to this

-
.

 Can't load :(

 
 by foolosophy on: Sep 15 2008
 
Score 50%

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- Korundum (LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /home/pablo/.kde3.5/share/apps/amarok/scripts/lyric_parser/amarok.rb:8

That's the error I get. I'm running Gentoo, with ruby-1.8 installed.


Reply to this

-

 Re: Can't load :(

 
 by conanrealm on: Sep 16 2008
 
Score 50%

I'm on Debian and I had to install libkorundum0-ruby1.8.


Reply to this

-

 Re: Re: Can't load :(

 
 by foolosophy on: Sep 16 2008
 
Score 50%

Ah, that did it. Thank you.


Reply to this

Add commentBack






-
-
How do you like Plasma 5?
 The best KDE Desktop ever.
 Definitely a nice improvement.
 Not decided yet. Haven't tried it yet.
 I do not like some of the changes.
 KDE is taking the wrong way.
 I am still sticking with KDE 3.5.
 I have no opinion, but wanted to vote anyway.

resultmore
 
 
 Who we are
Contact
More about us
Frequently Asked Questions
Register
Twitter
Blog
Explore
Apps
Jobs
Knowledge
Events
People
Updates on identi.ca
Updates on Twitter
Facebook App
Content RSS   
Events RSS   

Participate
Groups
Forum
Add App
Public API
About KDE-Apps.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2003-2014 KDE-Apps.org Team  
All rights reserved. KDE-Apps.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
KDE and K Desktop Environment are trademarks of KDE e.V.