Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 13cbeb4414
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (19 sloc) 0.583 kB
#!/usr/bin/env ruby
# puts "row\tfont\tscore"
puts "font\tscore"
n = 1 # the row number b/c R likes that.
$stdin.readlines.each_with_index do |line, i|
if i > 0
line.chomp!
font, sd, md, wd, wa, ma, sa = line.split "\t"
$stderr.puts "#{font}:\t#{[sd, md, wd, wa, ma, sa].join("\t")}"
[sd, md, wd, wa, ma, sa].each_with_index do |amt, score|
# score = 2*score.to_i - 5 # Convert to -5, -3, -1, 1, 3, 5
amt.to_i.times do |j|
# puts [n, font, score].join("\t")
puts [font, score].join("\t")
n += 1
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.