Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Aminadav/9e1872d73c054260c32823ba4654ee1d to your computer and use it in GitHub Desktop.
Save Aminadav/9e1872d73c054260c32823ba4654ee1d to your computer and use it in GitHub Desktop.
var fs=require('fs')
var raw=fs.readFileSync(process.argv.pop()).toString()
// Remove first line
raw=raw.split('\n')
raw.shift()
raw=raw.join('\n')
tweets=JSON.parse(raw)
for(var i in tweets) {
console.log(tweets[i].text)
}
@Aminadav
Copy link
Author

Using from command line:

for %d in (data\js\tweets\*.*) do @node justTweets.js %d >> mytweets.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment