This is a Rails website that provides a web interface for twstat. twstat is a script that generates a single web page of charts from the data in a Twitter archive.
The generated web page references the following libraries from online sources:
- jQuery (from CDNJS)
- jQCloud jQuery plugin (from CDNJS)
- Google Chart Tools
In December 2012, Twitter introduced a feature allowing users to download an archive of their entire user timeline. By February 2013, it was available to all users.
To request your Twitter archive:
- Visit https://twitter.com/settings/account
- Click on the "Request your archive" button. (near the bottom of the settings page)
- Wait for an email from Twitter with a download link.
Download the file tree and deploy it as a Rails application. This step depends on your web hosting setup.
By default, twstat-web uses SQLite for the database backend. Edit
config/database.yml
if you wish to use a different database server.
Sign up for a Twitter API key at https://apps.twitter.com/ and add it to the
production section in config/apikeys.yml
. You may also add a development API
key here if you are installing another copy for testing.
Run the following in the root of the file tree:
bundle install
rake secret
(Use the secret key generated by this command to set theSECRET_KEY_BASE
environment variable for the user running this Rails application in production mode.)RAILS_ENV=production rake db:migrate
RAILS_ENV=production script/delayed_job start
bundle exec rails server -e production
The delayed_job
startup command should be placed in bootup actions or
equivalent at your web host.
The rails server
startup command may also differ or be eliminated entirely
depending on your web hosting setup.