chore: edit instance name and link
fix: results reduced to 9 to avoid hitting Mastodon 500 character limit
chore: clean up unnecessary .capitalize() calls in database.py
A free, open-source, keyword-based, fighting games' characters recommender, and Mastodon bot written in Python. Database hosted on MongoDB's Atlas.
git clone https://git.sr.ht/~mohab/fightlike
cd fightlike
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Fightlike's default, MongoDB database and collection names are fightlike
and character
. To replace them, edit lines #30 and #33 in db.py:
# Get database.
db = client.fightlike
# Get collection.
collection = db["character"]
Default character document template in database:
{
_id: 650060820a48eee8cba77d1c,
name: "Eddie",
game: {
title: "Guilty Gear XX Accent Core Plus R",
netcode: "rollback",
franchise: "guilty gear",
slug: "ggxxacpr"
},
slug: "zato",
keywords: [
"puppet",
"summoner",
"flight",
"negative edge"
],
}
Accompanied pytest files test the following:
util.py
String literals inside test_util.py
and test_db.py
can be changed to suit custom configurations.
To run all tests:
pytest
cat >> mastodon_api_token.secret
<YOUR_MASTODON_ACCESS_TOKEN>
cat >> .env
DB_URI="<YOUR_MONGODB_URI>"
API_BASE_URL="<YOUR_API_BASE_URL>"
python fighlike.py
API_BASE_URL
is where your bot lives. Fightlike is hosted on botsin.space
To exit cat
, press CTRL+D