onyxfish/invar — pull request #7 by JoeGermuska (2012-08-22 23:58:35+00:00)
Title: add grid rendering

this works. A few things to consider:

maybe the --grid CLI option is redundant for ivtile since I don't know why you wouldn't always specify fields -- if you don't specify anything, no data is passed, so that seems useless. Still, it seems legal, so it seemed wise to allow people to publish the grids with no fields.

Also, the skip-if-exists code doesn't deal with the real possibility that the image exists but the JSON doesn't. It seemed complicated to refactor that to test one or the other. Perhaps the grid renderer should be independent of the image rendering, but that would be a different kind of refactor. I opted for reasonably expedient and someone else can do the next pull request!