Source

eggDiscover / documentation / source / install.rst

Installation

Requirements

To run Egdiscover you will need :

  1. Virtualenv
  2. Pip
  3. RabbitMQ

Get the needed modules

You will need to create a virtualenv on your system :

>>> virtualenv environment

Then go in the created virtualenv and activate it

>>> cd environment
>>> source bin/activate

And copy the project somewhere in your file system

>>> hg clone https://bitbucket.org/boblefrag/eggdiscover .

Go in the created directory :

>>> cd eggdiscover

And install the requirements

>>> pip install requirements.txt

Configure your application

1) create a broker v_host and a broker user as explained in the RabbitMQ documentation. Give this user access to the broker vost

2) created a database. You can use PostgreSQL or MySQL for exemple. SQLite cannot be used as concurent write will be used.

3) Edit local_settings.py and change the values of DATABASES to match your configuration and edit BROKER part to match your broker installation.

Create a Twitter application

In order to be able to make request upon the twitter REST API, you will need a twitter application. Go on the twitter site and create your application.

Twitter will give you a consumer key and a consumer secret. put this informations in TWITTER_CONSUMER_KEY and TWITTER_CONSUMER_SECRET

= Create the databases tables ===========================

To init your database you need to run in the root of your project :

>>> python manage.py syncdb

This will create tables Django need to run properly. Django will ask you for creating a superuser account. type yes and create the account. You will need it to connect to the admin page.

Then run the migrations, migrations are a way to update the structure of databases tables when it is needed.

>>> python manage.py migrate

Get a twitter connect

To make request on the twitter API, you need an application (created above) and a user authorizing the application. To authorize the application with your account, the simplest thing to do is to run the development server :

>>> python manage.py runserver

And open your browser on http://localhost:8000/

And follow the instructions on the pages.

Once you authorize your application, you can go to :

http://localhost:8000/admin/twitteruser/

And add a twitter user you want to lookup.

You can then close your "runserver"

Launch Celery

Fetching all followers for a particular account can be time consuming. For this reason, you might want to let eggDiscover do this in the background. Simply launch celery and it will use your account to fetch information about followers of each "twitter_account" you've setted in the django admin site.

>>> python manage.py celeryd -B -l info

What to do next ?

At this point, you can either configure apache to run your project or simply use the development server for personnal use :

>>> python manage.py runserver

To fetch twitter, eggDiscover doesn't need the server beeing runing. The server is only needed to see the fetching process :

http://localhost:8000/monitoring

And to get the result of the fetch with filters and differents formats. Don't forget that it is always possible to use wget to gather auto-generated CSV files. see http://localhost:8000/results/ for informations and uses.