Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Export transcripts and uploaded files from your 37signals Campfire account
Branch: master
Pull request Compare This branch is 66 commits behind precipice:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
Gemfile
Gemfile.lock
LICENSE.txt
README.md
campfire_export.rb

README.md

campfire-export

I had an old, defunct Campfire account with five years' worth of transcripts in it, some of them hilarious, others just memorable. Unfortunately, Campfire doesn't currently have an export function; instead it provides pages of individual transcripts. I wanted a script to export everything from all five years, using the Campfire API.

I found a Gist that looked pretty good:

but it wasn't quite right. So this is my modification, converted to a GitHub repo.

Features

  • Saves HTML, XML, and plaintext versions of chat transcripts.
  • Exports uploaded files to a day-specific subdirectory for easy access.
  • Reports and logs export errors so you know what you're missing.

Installing

Ruby 1.8.7 or later is required.

First, clone the GitHub repo:

$ git clone git://github.com/precipice/campfire-export.git

If you don't already have Bundler installed, do that now:

$ gem install bundler

Then install required gems via Bundler:

$ bundle install

Configuring

There are a number of configuration variables clearly marked at the top of campfire_export.rb. The script won't run without them. Make sure to edit them before running the script, and also make sure not to check in your API token on any public source repo.

The START_DATE and END_DATE variables are inclusive (that is, if your end date is Dec 31, 2010, a transcript for that date will be downloaded).

Exporting

Just run ruby campfire_export.rb and your transcripts will be exported into a campfire directory, with subdirectories for each site/room/year/month/day. In those directories, any uploaded files will be saved with their original filenames. (Note that rooms and uploaded files may have odd filenames -- for instance, spaces in the file/directory names.) Errors that happen trying to export will be logged to campfire/export_errors.txt.

The Gist I forked had a plaintext transcript export, which I preserved as transcript.txt in each directory. However, the original XML and HTML are now also saved as transcript.xml and transcript.html, which could be useful.

Days which have no messages posted will be ignored, so the resulting directory structure will be sparse (no messages == no directory).

Limitations

  • Room name changes are not noticed.
  • Slow as all hell if you have file uploads.

Credit

As mentioned above, much of the work on this was done by other people. The Gist I forked had contributions from:

Also, thanks for comments and contributions:

Thanks, all!

Something went wrong with that request. Please try again.