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!
- Create a Twitter app
- Install the package using
pip install git+https://github.com/gblock0/TweetCloud
- 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>
Run tweetcloud SCREEN_NAME
to generate wordclouds for SCREEN_NAME
See tweetcloud --help
for more options
Running tweetcloud nasa 1000
generates:
-
Clone repo
-
Create new environment from environment.yml:
conda env create -f environment.yml
-
Activate environment and install using
--editable
:pip install -e ".[dev]"
-
Run tests with
pytest tests/
-
Run
pre-commit run --all-files
before opening a PR please -
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