Skip to content

Use the Calais web service to summarize a Reddit or Twitter user's interests.

Notifications You must be signed in to change notification settings

limonjello/usermine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

About
-----

usermine.py analyzes a user, returning a summary of what they've commented
on and URLs contained in their comments.

Analysis of comment text is done via the OpenCalais web service.

usermine.py works by:

1) Downloading the user's comment history from Reddit and/or Twitter

2) Going through the comments and, if the comment hasn't already been
   analyzed during a previous run, submitting the comment to the Calais web
   service

3) Summarizing the semantic data returned by Calais in either JSON or
   human-readable text.

Results are stored in a database file.

Installation
------------

The script requires python-calais, which can be found at:

  http://code.google.com/p/python-calais

You'll need an Open Calais API key, which you can request here:

  http://www.opencalais.com/APIkey

Examples
--------

Analyze Reddit comment history of user "mcantelon" and display as JSON:

  usermine.py -u mcantelon -a abcdefghijklmnopqrstuvwx -r

Analyze Twitter status updates of user "mcantelon" and display as human-
readable text:

  usermine.py -u mcantelon -a abcdefghijklmnopqrstuvwx -t -o

Analyze Twitter status updates of user "mcantelon" and display as human-
readable text in debug mode:

  usermine.py -u mcantelon -a abcdefghijklmnopqrstuvwx -t -o -d

Notes
-----

The Twitter status update fetching uses the search API which, unfortunately,
only retains the last week or so of Tweets.

You may want to run usermine.py in debug mode until you get your options right.

Usage
-----

Usage: usermine.py [options]

Options:
  -h, --help            show this help message and exit
  -u USER, --user=USER  specify username to investigate
  -a API_KEY, --api_key=API_KEY
                        specify OpenCalais API key
  -f FILE, --file=FILE  specify database file (default is
                        "usermine-<username>.db")
  -d                    display debug information during processing
  -r                    fetch comments from Reddit
  -t                    fetch comments from Twitter
  -o                    display output as human-readable text instead of JSON

About

Use the Calais web service to summarize a Reddit or Twitter user's interests.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published