Graphing NetNewsWire With the Google Chart API

January 8th, 2009  |  Published in ruby

There’s a nice Ruby wrapper for the Google Chart API. Here’s that NetNewsWire group attention chart using it:


require 'rubygems'

require 'appscript'

require 'google_chart'

include Appscript

nnw = app("NetNewsWire")

unwanted_groups = ["Clippings", "Mobile", "Flagged Items", "Latest News", "monitors", "miscfeeds"]

groups = nnw.subscriptions[its.is_group.eq(true)].get

groups.reject!{|g| unwanted_groups.include?(g.display_name.get) }

pc ='500x200', "Groups", false) 

  groups.each do |s| s.display_name.get, s.calculated_attention_score.get


puts pc.to_url

“pc.to_url” yields:|mac|blogs|politics|web|people_blogs|news&chs=500x200

which produces this:


And here it is doing the Safari views-per-day history:


Leave a Response

© Michael Hall, licensed under a Creative Commons Attribution-ShareAlike 3.0 United States license.