Closed benlk closed 6 years ago
https://newsnerdery.slack.com/archives/C0ETGP7UZ/p1507139828000414
if the sheet is published to csv and get that URL, you can do something like
curl https://google.com/sheet/ID.csv | in2csv
It requires the sheet to be publically viewable technically, but unless its really sensitive info, it shouldn't matter
And I don't think that it matters; the sheet powering this can be publicly visible.
Alternately, use gdrive as described in https://github.com/The-Politico/gspan to pull in the file.
Closing this because it can live all as CSVs on github
As part of #1:
This will fetch the spreadsheet https://docs.google.com/spreadsheets/d/1Gx3KrCzldP7uYOi3lp6aZSkIZ80C_oZKsaj2CeKSBUM/edit#gid=1275143625 from Google and save it locally.
fab update_copy
grabs the latest copy of the spreadsheet: https://github.com/nprapps/dailygraphics/blob/dc5ba2bf0e2230e27b67c85c320ddc984f01df21/fabfile/__init__.py#L159-L176That uses
download_copy
: https://github.com/nprapps/dailygraphics/blob/dc5ba2bf0e2230e27b67c85c320ddc984f01df21/fabfile/__init__.py#L139-L156That uses some stuff imported from oauth: https://github.com/nprapps/dailygraphics/blob/dc5ba2bf0e2230e27b67c85c320ddc984f01df21/fabfile/__init__.py#L13
Which is all defined in oauth.py, https://github.com/nprapps/dailygraphics/blob/dc5ba2bf0e2230e27b67c85c320ddc984f01df21/oauth.py