Skip to content

Instantly share code, notes, and snippets.

@hoverbird
Forked from sstephenson/gist:105760
Created May 3, 2009 02:57
Show Gist options
  • Save hoverbird/105807 to your computer and use it in GitHub Desktop.
Save hoverbird/105807 to your computer and use it in GitHub Desktop.
# Back up your iTunes library to S3
git clone git://github.com/sstephenson/mackerel.git
ruby -rubygems mackerel/examples/itunes_backup.rb amazon-s3://YOUR_ACCESS_KEY_ID:[email protected]/YOUR_BUCKET_NAME/itunes.mackerel
#!/usr/bin/env ruby
# Generate a secure S3 URL to your backup of the currently playing song
require "itunes_backup"
backup = ItunesBackup.new("amazon-s3://YOUR_ACCESS_KEY_ID:[email protected]/YOUR_BUCKET_NAME/itunes.mackerel")
current_track = OSA.app("iTunes").current_track
puts backup.find(current_track.persistent_id).url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment