Skip to content

Instantly share code, notes, and snippets.

@jchris
Created October 10, 2008 23:51
Show Gist options
  • Save jchris/16186 to your computer and use it in GitHub Desktop.
Save jchris/16186 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'json'
require 'open-uri'
scores = JSON.parse(open('http://spreadsheets.google.com/feeds/list/pVNrsh7EqwD6HkFTmS3v9aw/od6/public/values?alt=json').read); nil
# scores['feed']['entry'].length
newscores = {}
scores['feed']['entry'].each do |e|
url = e["gsx$url"]["$t"].split('/')[2]
newscores[url] = e["gsx$score"]["$t"]
end
puts newscores.to_json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment