This is a small toy project for a Twitter bot
that uses the tweepy library
to interact with twitter.
I'm a fan of welcome to nightvale,
where there is a dogpark that is only used by hooded figures.
The hooded figures do not want people mentioning the dogpark - or thinking of it.
They especially do not want dogs in the dogpark.
This bot aids this strive for dogpark related content by reminding
other twitter users that they should be careful around the subject.
To do so it mentions them with a random selection from a set of predefined messages.
If you want to get a local copy of this bot working
feel free to follow these steps:
pipso that your python setup
has the required libraries.
- Use apps.twitter.com to create a new app.
- Use a command like
to start the bot while passing the CONSUMER_KEY and CONSUMER_SECRET
env CONSUMER_KEY=… \ CONSUMER_SECRET=… \ python3.5 main.py
of your app to it so that it can help you with the Oauth dance for a user.
ACCESS_TOKEN_SECRETare not provided the bot
will print a URL to
- Visit this URL with a browser logged in as the user you want to authenticate.
- Take the resulting code to the bot and enter it via
- The bot will print the
ACCESS_TOKEN_SECRETvalues to use.
- After having an authenticated user, use a command like:
to start the bot so that it performs its intended task.
env CONSUMER_KEY=… \ CONSUMER_SECRET=… \ ACCESS_TOKEN=… \ ACCESS_TOKEN_SECRET=… \ python3.5 main.py
The bot is also available as a docker container named runjak/hoodedfigure.
This image is an automatic build where
You can use the image with a command like this:
docker run \ -e CONSUMER_KEY=… \ -e CONSUMER_SECRET=… \ -e ACCESS_TOKEN=… \ -e ACCESS_TOKEN_SECRET=… \ -it runjak/hoodedfigure:latest