-
-
Save Encosia/3301296 to your computer and use it in GitHub Desktop.
Create counts for modules by category from nodejs.org module wiki
This file contains hidden or 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
var nom = require('nom'); | |
var categories = [ ]; | |
nom('http://github.com/joyent/node/wiki/modules', function(err, $) { | |
$('#wiki-body h1:eq(1)~h2~h3').each(function() { | |
categories.push({ | |
name: $(this).text(), | |
count: $(this).next().find('a').length | |
}) | |
}); | |
console.log(categories); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment