require 
require  

tasks  = [, , ]
part_uri  = 
Report = Struct.new(:count, :tasks)
result = Hash.new{|h,k| h[k] = Report.new(0, [])}

tasks.each do |task|
  puts 
  current_lang = 
  open(part_uri + CGI.escape(task)).each_line do |line|
    current_lang = Regexp.last_match[] if /==\{\{header\|(?<lang>.+)\}\}==/ =~ line 
    num_no_langs = line.scan(/<lang\s*>/).size
    if num_no_langs > 0 then
      result[current_lang].count += num_no_langs
      result[current_lang].tasks << task
    end
  end
end

puts 
result.each{|k,v| puts }