Skip to content

Instantly share code, notes, and snippets.

@benhoskings
Created January 25, 2011 04:29
Show Gist options
  • Save benhoskings/794513 to your computer and use it in GitHub Desktop.
Save benhoskings/794513 to your computer and use it in GitHub Desktop.
domain "api.campfire.com or something"
id = "your id"
dir = File.expand_path('~/Documents/Campfire Transcripts')
`mkdir '#{dir}'`
Dir.chdir(dir)
(2007..2011).to_a.each {|year|
(1..12).to_a.each {|month|
(1..31).to_a.each {|day|
uri = "http://#{domain}/room/#{id}/transcript/#{year}/#{month}/#{day}.xml"
`curl #{uri} > #{domain}-#{year}-#{month}-#{day}.xml`
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment