Skip to content

Instantly share code, notes, and snippets.

@JKring
Last active December 16, 2015 07:29
Show Gist options
  • Save JKring/5399473 to your computer and use it in GitHub Desktop.
Save JKring/5399473 to your computer and use it in GitHub Desktop.
export with format meta
fm = business.format_meta[batch.finished_jobs.first.format_id.to_s]
puts (["Prompt"] + fm).join("\t")
batch.finished_jobs.each do |j|
@out ||= []
j.document.content.each_with_index do |c, i|
if i % fm.size == 0
puts @out.join("\t")
@out = [j.prompts[i / fm.size]]
end
@out << c
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment