Skip to content

Instantly share code, notes, and snippets.

@lkptrzk
Last active August 29, 2015 13:58
Show Gist options
  • Save lkptrzk/10324416 to your computer and use it in GitHub Desktop.
Save lkptrzk/10324416 to your computer and use it in GitHub Desktop.
get-spumko-makefiles.js
// node get-spumko-makefiles.js && vim *.Makefile
var Async = require('async')
var Fs = require('fs')
var Request = require('request')
Request({
uri: 'https://api.github.com/orgs/spumko/repos',
headers: {
'User-Agent': ' '
}
}, function (err, res, repos) {
repos = JSON.parse(repos)
repos.forEach(function (repo) {
Request({
uri: repo.html_url + '/raw/master/Makefile',
headers: {
'User-Agent': ' '
}
}, function (err, res, makefile) {
if (err) {
return console.dir(err)
}
Fs.writeFileSync(repo.name + '.Makefile', makefile)
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment