Twitter Backup Utility

The following is a simple tool I hacked together in Java that downloads your twitter statuses to a directory, to test out the new WinRun4J Plugin for Eclipse. I wrote a simple Java class and then exported it to a single fat executable (console version): TwitterBackup.exe.

Note that you need Java to run this application: You can download it from here.

If you run it without command line arguments you get:

Twitter Backup v0.1.0 @winrun4j

A backup utility for Twitter statuses.

TwitterBackup [-user <user>|-search <search>] -outdir <backup_dir> 
    [-limit #hours|day|week|month|year]

The -user option is simply your twitter user id.

The -search option is a search query (you probably want to put “quotes” around it).

The -outdir option is the directory you want the statuses saved into.

The -limit option sets a time/date limit on the history, so “day” only loads statuses for the last 24 hours. The #hours is a number of hours (e.g. -limit 4 only saves statuses from the last 4 hours).

Some examples:

TwitterBackup -user twitter -outdir C:/TEMP -limit 12

This will save the “twitter” user’s statuses from the last 12 hours to the directory C:/TEMP.

TwitterBackup -search "cool filter:links" -outdir C:/TEMP -limit day

This will save all search results for “cool filter:links” for the last 24 hours to the directory C:/TEMP.

The utility is also incremental so you can run it over and over again and it will only grab new statuses.

It is designed to be run as a scheduled task (e.g. setup a schedule task to run every week and use the -limit week option).

Each twitter status is saved into a separate file using the unique status id provided by twitter. It simply contains the RSS item XML.

You can download TwitterBackup here

Note that Twitter has limits on how much you can download at one time and how far back in time you can go.

BTW The utility should work as specified but the author accepts no responsibilities is something screws up. Use at your own risk.

Advertisements

Comments are closed.

%d bloggers like this: