News for hackers. Stuff that matters.
Re:NPR open-sources Copytext, a library for handling spreads... by pixelmonkey on Tuesday April 22, 2014 @02:25PM (#7629419)
gspread is a little-known Python module that uses the Google Spreadsheet API and offers a simple interface atop it. You don't even need to download the .xlsx file -- you can keep in sync with the file in real-time.

https://github.com/burnash/gspread

I use it for some internal proj management tools at Parse.ly.

Re:NPR open-sources Copytext, a library for handling spreads... by staringmonkey on Tuesday April 22, 2014 @02:34PM (#7629462)
Hey, (I'm the original author of copytext at NPR) this looks like a really nice lib. FWIW, we specifically don't do it this way, because during development we're probably refreshing our page thousands of times and we don't want the delay of hitting the Google servers for every request.

Incidentally, that's also why we don't request the spreadsheet in Javascript--the lag time to render the page is too high.

We've found our approach gives us a nice balance of "real time" and "practical".

Thanks for the comment.

Re:NPR open-sources Copytext, a library for handling spreads... by toomuchtodo on Tuesday April 22, 2014 @06:10PM (#7630813)
Thank you for open sourcing it!
Re:NPR open-sources Copytext, a library for handling spreads... by dergachev on Tuesday April 22, 2014 @06:15PM (#7630839)
Nice, thanks for sharing this!

Also, I'm exploring simpler alternatives to oauth2 for command-line acccess to the Google Drive SDK, and your password approach is interesting. My current use case is extracting the HTML from a Google Doc and converting that to LaTeX with a custom template: https://github.com/dergachev/gdocs-export