Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
wzyboy committed Jan 18, 2021
1 parent 2a1f171 commit 024d03e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Twitter Beat: Ingest Your Tweets into Elasticsearch

## Usage

1. Set up venv and install requirements.
2. [Download a copy of your Twitter archive](https://help.twitter.com/en/managing-your-account/how-to-download-your-twitter-archive).
3. Load the tweets in the archive: `./main.py tweet.js my-tweets`.
4. Copy `tokens.example.json` to `tokens.json` and fill in your [API details](https://developer.twitter.com/en/apps).
5. Use cron / systemd timer to periodically run `./main.py api my-tweets` and keep your tweets updated.


## Notes

Twitter API has strict API rate limites. It is strongly recommended that you download a copy of your existing tweets and load them into Elasticsearch as mentioned above in steps 2 and 3, instead of fetching all your tweets from the API. With your existing tweets loaded into Elasticsearch, the script will fetch tweets that are newer than the last tweet in the database. On hitting rate limits, the script will pause for 15 min and retry.

0 comments on commit 024d03e

Please sign in to comment.