The code for @notrealhugo.
Uses my (@hugojmd) tweets as input into Redis, creating a key-value relationship as follows with two words as the key and one word as the value.
For example, the sentence The quick brown fox jumps over the lazy dog
gets ingested as:
The quick -> brown
quick brown -> fox
brown fox -> jumps
fox jumps -> over
jumps over -> the
over the -> lazy
the lazy -> dog
npm i
- Set your environment variables:
- Twitter (create an app here):
CONSUMER_KEY
CONSUMER_SECRET
ACCESS_TOKEN
ACCESS_TOKEN_SECRET
- Redis:
REDIS_URL
- The interval you want your bot to tweet at,
INTERVAL
(in minutes)
- Twitter (create an app here):
- Download your Twitter archive.
- Move it to
./tweets.csv
. - Run
npm start
will ingest your tweets into Redis, and start the bot. The first tweet is afterINTERVAL
minutes.
- Stream tweets from Twitter, via username, and ingest them into Redis.
- Weight the likelihood of a value being chosen by how frequently it is used.