Script-Generated Baby Names Rap

Script-Generated Baby Names Rap

# Baby Name Generator - Ruby script to generate our second boy's name # by Tom Söderlund, June 9 2012 - http://www.tomsoderlund.com - @tomsoderlund #!/usr/bin/env ruby start_letters = ['b','c','d','f','g','h','j','k','l','m','n','p','r','s','t','v','w'] middle_letters = ['i']#,'o','a'] end_letters = ['b','c','d','f','g','k','l','m','n','p','r','s','t','y','z'] word_count = 4 bridge_count = 0 puts "This is a story, about a boy, born at night, on the 8th of July." start_letters.each do |sl| puts puts "And he was called something starting with '#{sl.upcase}':" end_letters.each do |el| middle_letters.each do |ml| word_count = word_count + 1 if word_count > 3 word_count = 1 puts print ['his-name-was', 'like', 'and', 'sometimes', 'or-was-it'][bridge_count] + ' ' end print sl + ml + el + (word_count < 3 ? ' ' : ',') bridge_count = (bridge_count + 1) % 5 end end puts end # ruby name_generator.rb > name_list_rap.txt # Export to iTunes as spoken track, voice "Vicki"