Skip to content

Instantly share code, notes, and snippets.

@gerad
Created November 26, 2009 21:26
Show Gist options
  • Save gerad/243671 to your computer and use it in GitHub Desktop.
Save gerad/243671 to your computer and use it in GitHub Desktop.
Copy iTunes playlists to Android with Ruby
require 'rubygems'
require 'appscript'
require 'ftools'
it = Appscript.app('iTunes')
['80s Mix', 'Ridiculously awesome'].each do |playlist|
it.playlists[playlist].tracks.get.each do |track|
from = track.location.get.to_s
to = '/Volumes/ANDROID/Music' +
File.dirname(from.gsub /^.*?iTunes Music/, '')
puts "Copying #{from} to #{to}..."
FileUtils.mkdir_p to
FileUtils.copy from, to
end
end
@AdeleB
Copy link

AdeleB commented Apr 28, 2014

Great post: Copy iTunes playlists to Android. Thought Ruby is a good alternative to iTunes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment