Skip to content

Instantly share code, notes, and snippets.

@onyxfish
Created December 17, 2013 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onyxfish/8011701 to your computer and use it in GitHub Desktop.
Save onyxfish/8011701 to your computer and use it in GitHub Desktop.
The Google Spreadsheets republishing issue
We use Google Spreadsheets as a de facto CMS for most of our apps team projects. Examples:
http://apps.npr.org/best-books-2013/
http://www.lobbyingmissouri.org/
We store both the data and the text (copy) for the apps in those spreadsheets. Whenever we deploy we curl those spreadsheets, pull the data out of them and plug it into the app. This allows us the flexibility of collaboratively aggregating and editing application content with our reporters, without them needing to be able to run the app.
The Achilles hill of this process is that it currently requires us to manually go to File -> Publish to Web -> Republish now, in order for the latest data to be downloaded. This is very inconvenient when we are iterating quickly. I understand we could work around this by auth'ing to the API, but that's a) unnecessarily complicated and b) requires we deal with storing all those credentials or having a shared user account.
Two solutions spring to mind:
1) Remove the delay for public docs. I understand the data could be "constantly being edited" so this may not be realistic.
2) Give us a query string param or whatever to block the download until the cache is busted and regenerated in the format we need (always CSV).
3) Give us a Google Apps Script command to republish so we can turn it into a button. This won't solve the problem, but at least turns four clicks into 1. (Which doesn't sound like much, but I've been known to do this 50 times a day.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment