#lss_builder.rb #just make a list of names #and a list of times # #make sure they have the same #number of lines #maybe ill make a splits editor sometime def wrap(tag, str) return "<#{tag}>#{str}" end name_lines = File.readlines("splits.txt") time_lines = File.readlines("times.txt") both = name_lines.zip(time_lines) print both out = both.map { |x| realtime = wrap("RealTime", x[1].strip) splittime = wrap("SplitTime", realtime) splittimes = wrap("SplitTimes", splittime) name_tag = wrap("Name", x[0].strip) segment_tag = wrap("Segment", name_tag + splittimes) } File.write("output.txt", out.join(""))