Note
The original tool was created by ajdavis for Twitter,
before the free API got shut down.
I have adapted the original project to work with Mastodon.
Mastodon Proportional guesses the gender of your followers and those you follow by looking in their Mastodon profile names, bios, and extra fields for pronoun announcements like "she/her", or else guessing it based on first name.
Read the original author's article "72% Of The People I Follow On Twitter Are Men."
This script requires Python 3.8, and the packages listed in requirements.txt
.
py -m pip install -r requirements.txt
The repo contains an example app_render.wsgi
config useful when deploying to PythonAnywhere.
If you want to deploy to Railway, make sure you set the COOKIE_SECRET
and DEPLOY_URL
env variables.
First and foremost, you need to login on your Mastodon instance, open your profile, and go on
Preferences > Development > New Application. Pick a name, select read
and profile
permissions, and keep note of your
Client key and Client secret, as you will need to input them in the terminal when asked.
py analyze.py alexkalopsia@mastodon.social
Pass a Mastodon user handle to analyze the accounts the user follows and their followers.
It supports formats such as alexkalopsia
, @alexkalopsia
, @[email protected]
and [email protected]
.
Start a Flask server for testing:
Linux
COOKIE_SECRET=foo python3 server.py 8000
Windows
$env:COOKIE_SECRET="foo"; py server.py 8000
From the repository root directory:
py -m unittest discover -v