forked from somelab/SoMeToolkit
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0653219
commit c8e7baf
Showing
2 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ raw_tweets | |
logs | ||
insert_queue | ||
env | ||
platform.ini | ||
*.pyc | ||
|
||
error_inserted_tweet.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
; | ||
; SoMe Tools platform ini/config file | ||
; | ||
; Step 1: In the same directory as "tweet_collector.py", create a plain text file named | ||
; "collection.terms" and put one keyterm per line. | ||
; | ||
; Step 2: File >> Save as >> save this file as "platform.ini" - KEEP THE ORIGINAL AS BACKUP | ||
; | ||
; Step 3: Confirm "platform.ini" is in the same directory as "tweet_collector.py" | ||
; | ||
; Step 4: Visit: https://dev.twitter.com/apps/new | ||
; | ||
; Step 5: Login with your Twitter account | ||
; | ||
; Step 6: You'll be queries to "create an application" - you need to do this to obtain | ||
; "oauth" credentials. The name, description, and website are filler - feel free to use | ||
; whatever you like. Leave "callback URL" blank. Submit. | ||
; | ||
; Step 7: Change the values below: [collection] needs a name value, [files] require directory | ||
; path values and file names (change these!), and [oauth] requires the values you obtained | ||
; from the Twitter dev site | ||
|
||
[collection] | ||
; name is a human readable word(s) for logging and reporting about the data being collected | ||
name:billy | ||
; this is the mongo database name | ||
db_name:govdata | ||
; this is the mongo collection name | ||
collection_name:tweets | ||
|
||
; note: is there a way to take the file name from the collection name? so | ||
; %(name)s_tweets_out.txt | ||
|
||
[files] | ||
; this is where the raw tweets get stored from the collector | ||
raw_tweets_file_path:./raw_tweets/ | ||
|
||
; this where the raw tweets and the processed tweets get sotred | ||
tweet_archive_dir:./tweet_archive/ | ||
|
||
; this is where the processed tweets go while they wait to be inserted in mongo | ||
tweet_insert_queue:./insert_queue/ | ||
|
||
; the date format is used to build the tweets out file name as well as indicate | ||
; when the file should rool over. The fastest possible roll over (not reccomended) | ||
; is seconds and is specified with %Y%m%d-%H%M%S. For testing use minutes (%Y%m%d-%H%M) | ||
; or hours (%Y%m%d-%H), but for collection use hours or days (%Y%m%d) | ||
tweets_file_date_frmt:%Y%m%d-%H | ||
tweets_file:tweets_out.json | ||
; the final constructed file name will be something like: ./tweets/20130822-1030-track-tweets_out.json | ||
|
||
terms_file:./collection.terms | ||
|
||
log_file:./tweet_collection.log | ||
log_dir:./logs/ | ||
log_config_file:./logging.conf | ||
|
||
[oauth-track] | ||
consumer_key: lrZoHMNXE35WypwQbuccG6Ca5 | ||
consumer_secret: weoM7VN7lx7IvkC8zx3hNbnc7itHpVMBuJvLccyqyJzyyAvTUM | ||
access_token: 260546258-VJid9oU3QvxQ2UzfuGybtLELI45Pcb1D299wAooa | ||
access_token_secret: KFKWONgBKUPBedtEnHDwd7xGQhR8zF5Y1ScZadW55tqoy | ||
|
||
[oauth-follow] | ||
consumer_key: SqUhmu9GAEGrR9DGwOPL9nDjt | ||
consumer_secret: xp2ezq2zE3djgcUbeCeipTfBcIRvQPryBLdSEig8hinOBY2cHF | ||
access_token: 260546258-BWW0cVtX00CvYHulnM2F9peOn7HdUhsFHzUf1Rp9 | ||
access_token_secret: UIQ9YTAxjnqoxSU5A6kjpMHbD5NZoqfuAaBGu71AQxkwj | ||
|