Created
March 3, 2017 03:01
-
-
Save bibliotechy/510c3482974a1827c444cd46a05a23b7 to your computer and use it in GitHub Desktop.
google sheet to new line delimited json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#based on https://github.com/jsoma/tabletop/blob/master/examples/nodejs/test.js | |
var Tabletop = require('tabletop'); | |
var jsonlines = require('jsonlines'); | |
var stringifier = jsonlines.stringify(); | |
var gs_url = 'https://docs.google.com/spreadsheets/d/1zkIeYUXJCLuUpJRYK-WvCVDxyYs9sAtqeR3p_EzjKxs/pubhtml?gid=164906169&single=true'; | |
function onLoad(data, tabletop) { | |
stringifier.pipe(process.stdout) | |
data.forEach(set => stringifier.write(set)); | |
}; | |
var options = { | |
key: gs_url, | |
callback: onLoad, | |
simpleSheet: true | |
}; | |
Tabletop.init(options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment