Skip to content

Instantly share code, notes, and snippets.

@austindoeswork
Created September 25, 2018 22:10
Show Gist options
  • Save austindoeswork/e241e58bf802fc99422109fbad3b8415 to your computer and use it in GitHub Desktop.
Save austindoeswork/e241e58bf802fc99422109fbad3b8415 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
def pprint(statuses)
if statuses.length == 0
puts "no statuses found"
return
end
statuses.each do |code, uid|
puts "#{code}: #{uid}"
end
end
statuses = [
[100, "to_be_filtered"],
[150, "to_be_downloaded"],
[200, "filtered"],
[225, "sent_to_assembly"],
[250, "transcribed_by_assembly"],
[300, "being_transcribed"],
[400, "transcribed"],
[425, "transcription_qa_queued"],
[450, "transcription_qa_in_progress"],
[475, "transcription_qa_complete"],
[500, "being_scored"],
[600, "scored"],
[700, "surplus"],
[800, "flagged"],
[801, "flagged_rep_to_rep"],
[802, "flagged_background_noise_only"],
[803, "flagged_very_short_exchange"],
[804, "flagged_personal_or_non_work"],
[805, "flagged_interview_or_employment_verification"],
[810, "flagged_bad_quality"],
[815, "flagged_bad_tqr"],
[820, "flagged_reversed_rep_and_customer"],
[830, "flagged_no_customer"],
[850, "flagged_inaudible"],
[855, "flagged_no_audio"],
[860, "flagged_other_language"],
[870, "flagged_assembly_error"],
[880, "flagged_assembly_worker_error"],
[900, "expired"],
]
if ARGV.count == 0
pprint(statuses)
else
arg = ARGV[0]
selected = []
if arg.to_i != 0
code = arg.to_i
selected = statuses.select do |s|
s[0] == code
end
else
selected = statuses.select do |s|
s[1].include?(arg)
end
end
pprint(selected)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment