Adium
Dock Icons Emoticons Contact List Styles Message Styles Sound Sets AppleScripts Status Icons Service Icons Menu Bar Icons Plugins Miscellaneous All
Glyrics 0.5

Glyrics 0.5

Submitted By michael (37pens)

Description

***UNSUPPORTED for several years. Feel free to use any or all of it.***

Searches Google for the the lyrics of the current song in iTunes, and opens the first result ("I'm feeling lucky") in a new window.

"/glyrics"

EDIT: Written to use Safari. If you want to us IE or something else, "Safari" In the code to Internet explorer or whatever.

0.5: Guess what. Glyrics 0.5 will return the lyrics from lyricsfreak, azlyrics, elyrics4u, and plyrics.

More sites will be added when I get around it to.

Comments

You can reply to individual comments by clicking the "Reply" link next to each.

# by on 01/13/05 at 03:15:26

How do you use this thing. Where do you type /glyrics?

# by ihaveabellybutton on 01/13/05 at 03:34:45

Awesome!!
Can you make it return the lyrics to Adium or a dialog though?

# by 37pens on 01/13/05 at 04:03:37

Type '/glyrics' like you would send a message to someone.


I originally wanted to make it return to lyrics adium, but I there isn't really a standard format of lyric sites, and i couldn't find a site that had a lot of different lyrics that was more or less plain text.

If you have any ideas you're welcome to try, or just share them with me.

Thanks

# by zaudragon on 01/16/05 at 00:11:03

How about this: The receiver receives the URL. Or, you can do it where you have multiple if statements like "if URL contains lyricsfreak.com then" and use the format there. And include an else statement that just displays the URL without a http:// for the receiver's convenience :)

# by 37pens on 01/16/05 at 05:54:06

That's a pretty good idea, I'll probably start working on it, later this week when classes start again and i need to procrastinate.

# by zaudragon on 01/23/05 at 06:43:11

Look at the National Debt Script, which uses curl to download the page...

# by StarManta on 01/23/05 at 19:37:06

You can make it work in all browsers by simply doing "open location". i.e.

open location "http://ww.google.com"

I'm amazed at how many people don't know applescript does that....

# by 37pens on 01/24/05 at 16:42:54

I've been working with using curl, it's just a matter of the different formats of different lyric sites. Also, since the google feeling lucky search isn't the final URL which the lyrics are at, i'm having trouble finding a better way than making applescript delay an arbitrary 5 seconds before curling. I'm only a couple months into applescript so progress is kind of slow especially since I have too many other hobbies, and school.

# by 37pens on 01/26/05 at 02:38:27

Sorry folks, I think I'm quitting on this script for now atleast. If anyone else wants to give it a go have at it. I just don't have the time/know how/desire to keep trying to customize site by site it to return the actual lyrics. Thanks for trying my script out anyway.

# by zaudragon on 01/28/05 at 00:10:14

"delay 5" before the curling will delay 5 seconds

# by 37pens on 01/31/05 at 03:35:47

I have it set now to delay 5 before getting the URL, my problem with curling is only grabbing the lyrics cause pretty much every lyric site has a different format (http://www.lyricsfreak.com/j/jimi-hen.../71613.html & http://www.daily-lyrics-4all.com/Vood...Lyrics.html) When i finish up some of my other projects (I'm learning RB) I'll probably use your advice Zau with the if statements. and do 5-10 of the main lyrics sites. I'll try to get at least lyricsfreak and a few others this week.
Any suggestions for other sites? the only other ones i can think of that i've seen come up often for me are letssingit and purelyrics. Thanks for your help and patience

# by 37pens on 01/31/05 at 03:39:47

another thought i just had, but i think that it might be impossible. is to make applescript do a plain google search and select the first result from a viable site. I think there might actually be a way, but i'll need some help... to the forums...

# by zaudragon on 02/22/05 at 01:15:14

Instead of "Using Safari" thing, use "open URL" or I think it was like that...

# by 37pens on 02/22/05 at 15:40:43

I can do that, but i think i might wait a while, before uploading it to the site, so I can fix a lot of other stuff too (Such as the occasional "BR" that will slip in, and also add support for more sites.) It took them a full month approve this, so I'm going to wait until it's really worth it to upload a new version.

Is the only way to see what browser is being used an if statement seeing is say IE is being used? or is there a simple thing for getting the URL from the default browser?

any other suggestions?

# by zaudragon on 02/24/05 at 06:17:34

open location "http://www.adiumx.com" will open the Adium webpage in the default browser

# by pens on 02/24/05 at 15:16:36

Yeah, I know how to use open location, but is there a more efficient way of getting the URL from the default browser so i can curl the lyric site, than a bunch of if statements?

Post a New Comment

You must be logged in to post comments.

Install | Download
28.62kb (1795 downloads)

12345
3.60 / 98 votes
Current Version: -1
Last Updated: 02/01/05
Credits:
Inspired by Doug Adams' Google Lyric Search Also, thanks to zaudragon and BlueRevolution