Skip to content

Generates a gif of word clouds from a specific Twitter user's tweets

License

Notifications You must be signed in to change notification settings

gblock0/TweetCloud

Repository files navigation

Welcome to TweetCloud!

Build

The goal of this project is generate a gif of word clouds from a specific Twitter user's tweets. Currently, 3000 is the max number of tweets that will be fetched from Twitter.

NOTE: This project is in development, so not all features will work or are finished! Feel free to open a PR if you'd like to contribute!

Setup

  1. Create a Twitter app
  2. Install the package using pip install git+https://github.com/gblock0/TweetCloud
  3. Add the following keys from your new Twitter app to your environment variables
    • export TWTR_CONS_KEY=<TWITTER_CONSUMER_API_KEY>
    • export TWTR_CONS_SEC=<TWITTER_CONSUMER_API_SECRET_KEY>
    • export TWTR_ACC_KEY=<TWITTER_ACCESS_TOKEN>
    • export TWTR_ACC_SEC=<TWITTER_TOKEN_SECRET>

Basic usage

Run tweetcloud SCREEN_NAME to generate wordclouds for SCREEN_NAME

See tweetcloud --help for more options

Example

Running tweetcloud nasa 1000 generates:

TweetCloud Demo

Developing

  1. Clone repo

  2. Create new environment from environment.yml: conda env create -f environment.yml

  3. Activate environment and install using --editable: pip install -e ".[dev]"

  4. Run tests with pytest tests/

  5. Run pre-commit run --all-files before opening a PR please

  6. To regenerate the word lists run: python3 tests/helpers/generate_test_word_dictionaries.py

    NOTE: Running this will fail the test_create_wordcloud test, so please make sure to create new known images

Contributors

About

Generates a gif of word clouds from a specific Twitter user's tweets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages