Last active
March 19, 2017 17:41
-
-
Save SnacksOnAPlane/e1d0af73495a2c8a6a31bba731dca917 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ids = IO.read("/tmp/ids.txt").split(","); | |
calls = Call.where(id: ids); | |
CSV.open("/tmp/export-scoring.csv", "wb") do |csv| | |
calls.each do |c| | |
c = c.decorate | |
csv << [ c.id, c.duration, c.recording_mp3.expiring_url(time=1.week).to_s, "https://app.callrail.com#{c.web_waveform_path('primary')}", "https://app.callrail.com#{c.web_waveform_path('secondary')}", c.start_time, c.network, c.company.id, c.company.name ] | |
end | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment