Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
var lwp = require('LWP::UserAgent').new(agent => 'Mozilla/5.0');
|
||||
|
||||
var site = 'http://rosettacode.org';
|
||||
var list_url = '/mw/api.php?action=query&list=categorymembers&'+
|
||||
'cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml';
|
||||
|
||||
var content = lwp.get(site + list_url).decoded_content;
|
||||
|
||||
while (var m = content.match(/cm.*?title="(.*?)"/g)) {
|
||||
(var slug = m[0]).gsub!(' ', '_');
|
||||
var count = lwp.get("#{site}/wiki/#{slug}").decoded_content.count(/toclevel-1/g);
|
||||
say "#{m[0]}: #{count} examples";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue