$ grep -r 'def test_' ruby_koans/src > koans_def.txt
ruby script to generate the checklist
def koans_def(path: 'koans_def.txt')
koans = Hash.new{|hash, key| hash[key] = Array.new}
File.readlines(path).map do |line|
about, koan = line.split(/def test/)
about.gsub!('ruby_koans/src/', '').gsub!(/.rb:.+/, '')
koan.gsub!('_', ' ')
koans[about] << koan
end
koans.select {|about, koans| /about_/.match about }
end
def generate_checklist()
File.open('ruby_koans_checklist.txt', 'w') do |f|
koans_def.each do |about, koans|
f.puts
f.puts '## ' + about
koans.each do |koan|
f.puts '- [ ]' + koan
end
end
end
end
generate_checklist()