Skip to content

Analyzes twitter search queries for common words and patterns

License

Notifications You must be signed in to change notification settings

mik90/twitter-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitter-analyzer

What it does

  • Runs searches for the mentioned username(s) and then figures out
    • Most common words when people mention that given username
    • Most twitter handle pattern (e.g. CamelCase or namewithnumbers1234)

Usage

Queries

  • Run a query for @twitter with cargo run --release -- query @twitter
  • Run query on all accounts from conf/accounts.json with cargo run --release query

Analysis

  • Analyze all stored queries with cargo run --release -- analyze
  • Analyze single query for @twitter with cargo run --release -- analyze @twitter

conf/

auth/

  • Twitter API keys and tokens. Store your own bearer token under there in auth/bearer.token. Whitespace is trimmed.

Storage

  • Stores queries and analyses in json with serde_json
  • Storage base directory defaults to data/$QUERY
    • Analyses are stored as $SEARCH_DATE.analysis.json
    • Queries are stored as $SEARCH_DATE.query-result.json

Todo

  • Remove queries from most common words
  • Make an analyzer or query struct? It could have a storage handler
    • Storage dir could be configurable once instead of having to set the dir every time
  • Move all logic in main to a function that returns a `Result<>

About

Analyzes twitter search queries for common words and patterns

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published