UPDATE 3/16/2008: Apparently the project commits XML I was getting from ohloh wasn't an official API call, so now all pipes that depend on that are broken :-(
Hopefully the guys at ohloh will implement it soon!
The more, the merrier, right? This time I took the pipes from my previous post and graphed the commit activity using google charts. For example, this is the resulting graph of the latest commit history of Subversion code (at least the commits processed by ohloh):
Note: If you're reading this from rss, the graph will most probably not show up
The graph above is generated on the fly, it's not a static image. In fact, it's contained in an iframe. The page that generates the graph is customizable via querystring, so it is kind of a widget. It's all javascript, so you can drop it anywhere. These are the parameters it takes:
- api_key: ohloh api key (required)
- project_id: ohloh project id (required)
- page_count: how much history to get (roughly 25 commits per page) (default 1)
- interval: shows date on the x axis of the graph only every x days, to avoid overlapping (default 5)
- width (default 600)
- height (default 150)
In addition to the pipes from my previous post, I had to build a couple more:
- For loop (only works up to 1000, since it gets numbers from static source)
- Ohloh project commits multi-page: gets aggregate commit history from several pages of ohloh responses.
For date parsing, I used the awesome datejs.
PS: Please respect the Ohloh API terms, get your own API key and link back to their site. PS2: Let me know if you use this! Or if you find any bugs!
No comments:
Post a Comment