Parse Javascript, tag ID3 tags of MP3s problem

S

simon.noatv

I'm a Ruby newb, eager to learn. I think I found a problem where Ruby
might be the right "glue" for the job. But I'm having trouble getting
started.

General Problem:
I'm trying to tag ID3 tags of a bunch of MP3s based on data from the
web.

Specifics:
Web data is in javascript format here: http://www.omnimusic.com/library/by_cd/js/1.js
(View that data via html here: http://www.omnimusic.com/library/by_cd/cd.html?OMCD=1)

Javascript parser for ruby is here:
http://idontsmoke.co.uk/2005/rbnarcissus/

ID3 tagger is here:
http://id3v2.sourceforge.net/

I have already installed id3v2 via MacPorts and used it with success.

My thought is that I'd write something in Ruby that would use "curl"
to get the javascript, parse it, get the data I need and run the id3v2
command to update the ID3 tag. For example, the tempo of track 1 is
"144". So I will tag the Beats Per Minute tag of track 1 with "144"
using this command:
/opt/local/bin/id3v2 --TBPM "144" /Library/WebServer/Documents/
Omnimusic/"om00101.mp3"

So that's the gist of it. Now, I'm trying to get that Javascript
parser working. I am running the example parse.rb file like this:
ruby parse.rb 1.js

It returns nothing. So I guess that .js contains no functions? Any
ideas?

Any help is much appreciated!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top