A web app to check whether followers of a given Twitter account are bots using Botometer. This repository started as a fork of Twitter Clean-up.
If you're looking for the CLI version, it's tagged.
- Make sure you meet these requirements:
- Twitter API keys
- Botometer API key
- For development, Docker Compose
- For production, Dokku
- Set up your local configuration variables; you can:
- run Createnv,
- or manually copy
.env.sampleas.envediting it accordingly.
To start the services use the default docker-compose up. To prevent errors in the development environment, make sure the you have DEBUG=True in your .env file.
Having a Dokku-ready server:
- Install the following Dokku plug-ins:
- PostgreSQL (or other database of your choice)
- RabbitMQ (or other Celery broker of your choice)
- Let's Encrypt
- Create an app for Bot Followers in Dokku, add it as a remote repository in your local Git repository, and activate the plug-ins.
- For each variable in
.env, create an equivalent environment variable for your Dokku app.
The commands in this section might be prefixed by:
docker-compose run --rm djangoin development modedokku run <app name>in production mode
In order to get the app ready, before visiting / at your server, you need to run migrations and create a user(s) to access the dashboard.
- Run migrations with
python manage.py migrate - Create a super user for yourself with
python manage.py createsuperuser
It's recommended to create a proper user to access the dashboard without super powers: all you need to do is to:
- Login in as superuser create a new user that is staff
- Get back to the edit page of this user
- In the Permissions menu, add only the permission to view report to this new user
There is a simple JSON API at /api/ to share the report data without the need of user or login.
Importing data from the CLI version
$ python manage.py import /path/to/borsalino.sqlite3$ python manage.py updatecelerytasks$ python manage.py purgecelerytasksPlease, write tests, run checks, and format your code with Black:
$ python manage.py test
$ black .