github 3

repo.getTree('master', function(err, tree) {});

by Andy Bulka

HTML

<script src="https://dl.dropboxusercontent.com/u/2019810/scripts/github.bundle.min.js"></script>

JavaScript

console.log('GITHUB analysis....')
var github = new Github();
var repo = github.getRepo('abulka', 'pynsource');

String.prototype.repeat = function( num ) {
    return new Array( num + 1 ).join( this );
}

/*
function showtree(dir_str, indent) {
  //console.log('showtree:', dir_str);
	repo.contents('master', dir_str, function(err, contents) 
	{
    for (var x=0; x < contents.length; x++){
      var f = contents[x];

      if (f.type == 'dir') {
        showtree(f.path, indent+1);
      }
      if (f.path.indexOf(".py") > -1) 
      {
        var s = "    ".repeat(indent);
        console.log(s, f.path);  // or f.html_url
      }
    }
  });
}
showtree('src', 0);
*/

repo.getTree('master?recursive=true', function(err, tree) {
	if (err != undefined) {
  	console.log(err);
    return;
  }
	console.log(tree);
  for (var x=0; x < tree.length; x++){
    var f = tree[x];
    //console.log(f.path);
    if (f.path.indexOf(".py") > -1) 
      console.log(f.path);  // or f.html_url
  }
});