Flatware

Flatware provides a tiny S3 buffer between you and Google Spreadsheets, protecting you from downtime, lag and the terrifying caprice of Mountain View.

The What-For

Flatware takes Google Spreadsheet JSON responses and uploads them to S3, so when using Tabletop.js you don't have to rely on Google Spreadsheets necessarily being up and around.


The Backend How-To

You'll need to run your own instance of Flatware on your own Heroku account, but it ain't hard. If you're set up with heroku, the github repo can just be cloned locally and pushed right up.

git clone git@github.com:jsoma/flatware.git
cd flatware
heroku create
git push heroku master

Then you'll need to add in your Amazon Web Services keys and the bucket you'd like to drop the content in.

heroku config:add AWS_ACCESS_KEY_ID=xxx AWS_SECRET_ACCESS_KEY=yyy AWS_BUCKET=zzz

The Frontend How-To

When you're using Tabletop.js, just pass

proxy: 'https://yourbucketname.s3.amazonaws.com'

and as long as you've synced you'll be golden.


Adding new Spreadsheets

Easy-peasy. Over on the right you add either a spreadsheet key or a full URL like, so either of the below would work.

0AmYzu_s7QHsmdE5OcDE1SENpT1g2R2JEX2tnZ3ZIWHc
https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AmYzu_s7QHsmdE5OcDE1SENpT1g2R2JEX2tnZ3ZIWHc&output=html

Uploading to S3

The easy way right now is to click "Sync all spreadsheets" over on the right-hand column

But you should probably run the rake task rake flatware:process instead, which loops through all spreadsheets and tries to get them up on S3. On Heroku that would be

heroku run rake flatware:process

Automating the process

If you're using Heroku, you can use Scheduler to run rake flatware:process every X minutes.

They docs for scheduling a task are kind of buried, you can find them here.


Who the hell am I?

Hi, I'm Jonathan Soma, I made Tabletop.js and run Brooklyn Brainery. Questions, comments and righteous outrage can find me at @dangerscarf or jonathan.soma@gmail.com.

I made Flatware in like an afternoon so please please contribute to the repo on github.

The Spreadsheets

Current spreadsheets