jchris (owner)

Revisions

gist: 16186 Download_button fork
public
Public Clone URL: git://gist.github.com/16186.git
Embed All Files: show embed
make-red-blue-json.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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