https://github.com/benfugate/clash-war-tracker
1.2K
This is a super simple clash of clans war performance tracker. It started as a simple script that I ended up building on quite a bit, so it has turned into a little bit of a mess. But it works for what I need.
I wanted to be able to track my clan members performance between wars, including easily seeing how many missed attacks they had. This is then displayed on a simple webpage for viewing.
There may be tools out there that already do this, but now there's this tool too I guess.
You will need a free clash of clans API account from https://developer.clashofclans.com/
docker run \
-p 80:80 \
-e COC_USERNAME=<USERNAME> \
-e COC_PASSWORD=<PASSWORD> \
-e COC_CLAN_TAG=<CLAN_TAG> \
-v <WWW_FOLDER>:/var/www/html/ \
benfugate/clashtracker:latest
Replace the username, password, and clan tag with your own information and with the clan you would like to track.
By exposing port 80, you will be able to view the simple webpage at localhost:80
If you do not mount a volume to docker run, the data files contained in /var/www/html/
will be overwritten when the docker image is updated. The www/ folder in this repo, can and should be
used as the host mounting point to retain data through updates.
Crontab will check for clan war updates every 5 minutes, and the changes will be reflected on the webpage, or in
/var/www/html/clash.json (or /var/www/html/current_war.json for an active war)
The docker container will backup the clash.json every day at midnight to
/clash-tracker/backups, mainly just in case I break something in the code.
Also at midnight, a helper script get_active_players.py will run. This script gets the list of players
currently in the clan, and will mark any players you have been tracking as not in the clan in the clash.json
They will also no longer appear on the webpage view, but the data will persist in case they rejoin in which the
flag wull be updated.
Content type
Image
Digest
sha256:63c16e268…
Size
109.2 MB
Last updated
12 days ago
docker pull benfugate/clashtracker