== Aviary, a Twitter Archiver
Aviary is a simple Ruby script to retrieve and archive your tweets. Twitter
"claim no intellectual property rights over the material you provide to the
Twitter service," so you should have a way of storing and repurposing your
data.
== Requirements
Aviary requires the Hpricot and builder gems.
== Running Aviary
First, copy the config-example.yml to config.yml, then fill in your username
and password. Run Aviary with:
$ ruby aviary.rb --updates [new|all] [--page XXX]
Aviary will create a directory called USERNAME and begin parsing your Twitter
archive and downloading the raw XML representation of each tweet. The
"--updates all" option will parse and save every tweet, while "--updates new"
will stop parsing your online archive when it encounters a tweet that's
already been downloaded. Optionally, specify a page number to retrieve tweets
starting from that page. This is useful when restarting the script after a
timeout.
Currently Aviary will not use your password to authenticate requests, so your
timeline will need to be public. This is to get around the API request limits.
Use the cat_statuses.sh script to combine all downloaded tweets for a user
into one statuses XML file.
$ SCREEN_NAME=username ./cat_statuses.sh > username.xml
will read in all tweets in the username directory and concatenate them
together in a file called username.xml.
== Creating an events timeline
Assuming you have already put all of your status files into a single XML file
using cat_statuses.sh, you can transform it into a SIMILE timeline
(http://simile.mit.edu/timeline/) using the assets/simili.xsl transformation
stylesheet. View the data by modifying assets/events_template.html, replacing
"screenname_events.xml" (Line 66) with the filename of your transformed
statuses XML document.
This can also be done automatically using the timeline.rb script:
$ ruby timeline.rb -u USERNAME
which will read in single tweets from the USERNAME's directory and construct
an events timeline (USERNAME_events.xml) in the timelines directory.
== What next?
Now your data is yours! Start thinking about your own way to utilize your
own data. Start thinking about your children's children's children. Will they
be accessing the possibly non-existent http://twitter.com or would they
prefer a paper record of "what you were doing"?