Access Google doc as api
This is pretty cool, here's one way
This is where it gets cool, you can issue a curl command against that url and pipe to a file
e.g.
curl 'https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=<the_key>&output=csv' -o data.csv
So you can curl a google doc onto a server!
- in a goolge doc, click Share ->Publish to Web
- click Start Publishing
- you can choose output format for spreadsheets e.g. html, csv, txt etc
- you'll see a url on the page, you can actually now hit that url
This is where it gets cool, you can issue a curl command against that url and pipe to a file
e.g.
curl 'https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=<the_key>&output=csv' -o data.csv
So you can curl a google doc onto a server!
Comments
Post a Comment