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.
- Twitter API keys
- Botometer API key
- Docker Compose for the development mode instructions
- Dokku for the production mode (deploy) instructions
Copy .env.sample
as .env
and fill the environment values as appropriated. I tried to use meaningful variables names, but fell free to ask if anything is not clear.
To start the services use the default docker-compose up
.
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.sample
, create an equivalent environment variable for your Dokku app.
The commands in this section might be prefixed by:
docker-compose run --rm django
in 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 purgecelerytasks
Please, write and run tests, and format your code with Black:
$ black .
$ python manage.py test