Wednesday, August 20, 2008

Last.fm Cocoa Tagger v1.2

I added some new features including:



Most of these features allow you to keep the app open (as long as it doesn't crash). Check it out!



Download now

Labels: , , , , , , , , ,


Friday, June 6, 2008

Last.fm Tagger 1.1

I just implemented a feature to sort artists by name. I got a comment on my build.last.fm project page that commented about how the tagger works when artists in iTunes are sorted by name. Instead of relying on iTunes, I am now sorting by artist name in the actual code.

Not a huge change, but slightly significant. I am working on win32 compatibility also. If anyone can help, that would be great!

Ideally, I want to check the ENV constant for a string of /windows/i and then load win32ole gem and then abstract the iTunes interface to handle it properly.

Download last.fm tagger 1.1

Labels: , ,


Tuesday, March 11, 2008

We Made it to 1.0!

I made a nice improvement that I feel warrants a 1.0 release. That improvement is simply a hash that stores genres for the life of the process so that an additional query to last.fm is not needed. I fixed a bug where "q" wasn't cleanly aborting the process. Also, I did a little spring cleaning with the code... moved everything out of a main file and into separate files for better organization.

I'm happy to say that build.last.fm accepted my application! So you can now find the tagger on build.last.fm.

If anyone out there would like a feature added, just let me know and I'll see about implementing it.

Get 1.0 now!

Labels: , , ,


Thursday, February 28, 2008

Last.fm Tagger 0.9

I've made a few improvements to the Last.fm Tagger. Namely, the ability to cleanly abort the tagging process. Other features include displaying a count of tracks selected in iTunes, as well as the number of unique artists in that selection.

As always, you'll need the wonderfully awesome RubyOSA gem installed.

Download it now.

Labels: , , , ,


Tuesday, October 9, 2007

Last.fm Tagger for RubyOSA Update 3

I've once again improved my little Last.fm script for use with RubyOSA. It needed updating badly. There were quite a few things bugging me.

What's new:

• Nice console messages telling you what's happening.
• Support for skipping over identical genre's.
• Ability to continue or abort tagging process. So if you don't like that tag, type 'n'.
• Use -q to subdue tagging confirmations.
• Full UTF-8 support, as well as proper URL escaping.



Download it now! And have somewhat useful genre's to choose from.

I will tackle cleaning it up later. Add me to your RSS reader if you want script updates.

Remember, you can get RubyOSA with the Last.fm Tagger here.

Labels: , , , , , , , ,


Monday, March 19, 2007

New Last.fm Tagger for RubyOSA

Laurent Sansonetti was generous enough to ask me if I wanted to contribute my little Last.fm script to the RubyOSA samples directory. And of course, I was more than willing to do that. He actually updated the script to make it even better! Now, you simply select which track in iTunes you want to tag, and run the RubyOSA script. The script will then query Last.fm for the most popular tag, and set the genre to whatever the tag on Last.fm is.

Here's the updated code:

begin require 'rubygems'; rescue LoadError; end
require 'rbosa'
require 'net/http'
require 'cgi'
require 'rexml/document'
include REXML

itunes = OSA.app('iTunes')
selection = itunes.selection.get
if selection.empty?
$stderr.puts "Please select some tracks."
exit 1
end
selection.each do |track|
feed = "http://ws.audioscrobbler.com/1.0/album/#{CGI::escape(track.album)}/toptags.xml"
doc = Document.new(Net::HTTP.get(URI(feed)))
track.genre = doc.root[1][1].text
end


Remember, you can get RubyOSA with the Last.fm Tagger here.

Thanks to Laurent for making an awesome library. It makes playing with Ruby even more fun!

Labels: , , , , ,


Wednesday, November 15, 2006

Get Genre's from Last.fm and Tag with Last.fm Using RubyOSA

I’ve always hated genre’s. They always place a constriction on the acceptance of an artist. However, they do come in handy in certain situations. For instance, I like to tag all my ambient stuff so that I may quickly choose an artist to fall asleep to. Now, I’m on a tagging rampage, however there are some artists where I have no idea how to “genrealize” it. Ah, but the ever-growing community on Last.fm tags artists! Most of the time, the genre is agreeable upon a majority and therefore acceptable to me. I was growing sick of searching Last.fm for each artist, then choosing the most popular tag and tagging it in iTunes. If it weren’t for RubyOSA, I could not have accomplished what I wanted to do.

This is a perfect project for me that I hope to evolve into a more interactive process. Currently, the script is very basic in that you run it, it grabs the tag feed from Last.fm and sets the genre of the artist that you’re listening to. Check it out:




require 'rubygems'
require 'rbosa'
require 'net/http'
require 'cgi'
require 'rexml/document'

include REXML

itunes = OSA.app('iTunes')
track = itunes.current_track
feed = "http://ws.audioscrobbler.com/1.0/artist/#{CGI::escape(track.artist)}/toptags.xml"
doc = Document.new(Net::HTTP.get(URI(feed)))
track.genre = doc.root[1][1].text


In the future, I would like to provide a list of the top 10 tags in which you choose which to tag this song with and ultimately, I’d like to tag the whole artist with the genre. Maybe I could also provide album tagging, since some artists deviate in style across multiple albums.

Labels: , , ,


Thursday, June 29, 2006

Adventures with Ruby (part 1)

These are notes I’m taking while reading the Programming Ruby book. It’s excellent.

General Ruby

Classes

Cool and unforgettable features

I AM WHAT I DO NOT UNDERSTAND. I AM ARBITARY!

Labels: ,


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]