Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add meat

  • Loading branch information...
commit 61822e82a6f9fe7cf57448c6df6eb70154a7632a 1 parent 82d50d2
Kevin R. Barnes authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 twitter_track.rb
12 twitter_track.rb
View
@@ -0,0 +1,12 @@
+require 'rubygems'
+require 'appscript'
+include Appscript
+
+USER = '<your_name_goes_here>'
+PASSWD = '<your_topsecret_password_goes_here>'
+
+itunes = app('iTunes')
+track = itunes.current_track.name.get
+artist = itunes.current_track.artist.get
+post = "listening to '#{track}' by #{artist}"
+result = %x[curl -u #{USER}:#{PASSWD} -d status="#{post}" http://twitter.com/statuses/update.json]
Please sign in to comment.
Something went wrong with that request. Please try again.