<commit_before>social feed manager
===================

A django application for managing multiple feeds of social media data.

Developed at the GWU Libraries in Washington, DC, USA.

See also LICENSE.txt.


installation
------------

Developed using python 2.7 and postgresql-9.1 on osx for deployment
on ubuntu lts; your mileage may vary.

* get this code:

        % git clone git://github.com/gwu-libraries/social-feed-manager.git
        % cd social-feed-manager

* create and activate a virtualenv:
  
        % virtualenv --no-site-packages ENV
        % source ENV/bin/activate
    
* install ubuntu package dependencies:
        
        % sudo apt-get install apache2 python-dev postgresql libxml2-dev libxslt1-dev libpq-dev libapache2-mod-wsgi

* prep postgres (change name/pass/permissions/pg_hba.conf as appropriate):
    
        % sudo su - postgres
        (postgres)% psql
        postgres=# create user sfmuser with createdb password '<PASSWORD>';
        CREATE ROLE
        postgres=# \q
        (postgres)% exit
        % createdb -U sfmuser sfm -W
        Password: <'<PASSWORD>'>

* install requirements

        % pip install -r requirements.txt

* add and edit local_settings.py; include db settings as appropriate

        % cp sfm/local_settings.py.template sfm/local_settings.py

* specify the location of your virtualenv's site-packages in sfm/wsgi.py

* set up the db from django

        % syncdb

* to plug in to 
* start a feed in Gnip's console


usage
-----

* see your rules
    
        % ./manage.py rulesall

* add rules

        % ./manage.py rulesadd foo bar baz
        % ./manage.py rulesadd --tag election2008 obama biden mccain palin<commit_msg>oops missed this, refs #11<commit_after>social feed manager
===================

A django application for managing multiple feeds of social media data.

Developed at the GWU Libraries in Washington, DC, USA.

See also LICENSE.txt.


installation
------------

Developed using python 2.7 and postgresql-9.1 on osx for deployment
on ubuntu lts; your mileage may vary.

* get this code:

        % git clone git://github.com/gwu-libraries/social-feed-manager.git
        % cd social-feed-manager

* create and activate a virtualenv:
  
        % virtualenv --no-site-packages ENV
        % source ENV/bin/activate
    
* install ubuntu package dependencies:
        
        % sudo apt-get install apache2 python-dev postgresql libxml2-dev libxslt1-dev libpq-dev libapache2-mod-wsgi

* prep postgres (change name/pass/permissions/pg_hba.conf as appropriate):
    
        % sudo su - postgres
        (postgres)% psql
        postgres=# create user sfmuser with createdb password '<PASSWORD>';
        CREATE ROLE
        postgres=# \q
        (postgres)% exit
        % createdb -U sfmuser sfm -W
        Password: <'<PASSWORD>'>

* install requirements

        % pip install -r requirements.txt

* add and edit local_settings.py; include db settings as appropriate

        % cp sfm/local_settings.py.template sfm/local_settings.py

* specify the location of your virtualenv's site-packages in sfm/wsgi.py

* set up the db from django

        % syncdb

* to plug in to apache, use sfm/apache.conf and adjust in an 
  /etc/apache/sites-available file as appropriate

* start a feed in Gnip's console


usage
-----

* see your rules
    
        % ./manage.py rulesall

* add rules

        % ./manage.py rulesadd foo bar baz
        % ./manage.py rulesadd --tag election2008 obama biden mccain palin
{'fraction_non_alphanumeric': 0.09486959014044138, 'fraction_numerical': 0.007451991974777874, 'mean_word_length': 2.5216952573158427, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2668129', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1022, 'n_words': 360}