Python tools for creating a clan management dashboard for Clash Royale
Project description
crtools – Clash Royale Clan Dashboard generator
This is a tool for creating a dashboard for clan participation in ClashRoyale. See https://developer.clashroyale.com to sign up for a developer account and create an API key to use with this.
For an example dashboard created for the clan Agrassar (#JY8YVV), see: https://agrassar.com/
Installation
This requires Python 3 and pip on your machine. To install, use
pip3 install crtools
If you have an older version installed, to upgrade to the latest version, run:
pip3 install -U crtools
Syntax
Usage:
crtools [-h] [--config CONFIG-FILE] [--api_key KEY] [--clan TAG]
[--out PATH] [--favicon PATH] [--clan_logo PATH]
[--description PATH] [--canonical_url URL] [--debug]
[--version]
- optional arguments:
- -h, --help
show this help message and exit
- --config FILE
configuration file for this app.
- --api_key KEY
API key for developer.clashroyale.com
- --clan CLAN
Clan ID from Clash Royale. If it starts with a ‘#’, clan ID must be quoted.
- --out PATH
Output path for HTML.
- --favicon PATH
Source path for favicon.ico. If provided, we will copy to the output directory.
- --clan_logo PATH
Source path for clan logo PNG. Recommended at least 64x64 pizels. If provided, we will copy to the output directory.
- --description PATH
Source path snippet of HTML to replace the clan description. Should not be a complete HTML document. Sample here: https://github.com/AaronTraas/crtools-agrassar-assets/blob/master/description.html If provided, we will copy to the output directory.
- --canonical_url URL
Canonical URL for this site. Used for setting the rel=canonical link in the web site, as well as generating the robots.txt and sitemap.xml
- --debug
Turns on debug mode
- --version
List the version of crtools.
Optional config file
crtools looks for a config file in your home directory called .crtools
This is an INI file. As of current version, there’s only one possible parameter: api_key. The file should look like:
[API]
# API key provided for your account at https://developer.clashroyale.com
# Note that the key is limited to a specific list of public IP addresses
api_key=<YOUR-API-KEY>
# Your clan tag
clan_id=#JY8YVV
[Paths]
# your output path. Where you want the static website to live.
out=/var/www/html
# Path to the logo artwork for clan. Must be PNG. Recommended at
# least 64x64 pixels.
clan_logo=~/myclan/logo.png
# Path to the favicon file you want to use for this
favicon=~/myclan/favicon.ico
# Path to a file that contains arbitrary HTML for the site.
description_html=~/myclan/body.html
[www]
# Canonical URL for this site. Used for setting the rel=canonical
# link in the web site, as well as generating the robots.txt
# and sitemap.xml
canonical_url=https://yourclan.com/
For more details, see samples/crtools.ini
Suggested usage on a Linux web server
Assuming root is going to be running the script:
Download and install this application
Install nginx or apache
Create
/root/.crtools
file as specified above, and add your API keyFind your document root (e.g.,
/var/www/html
)Create the following entry in your crontab:
0 * * * * crtools --out=[YOUR-DOC-ROOT] [YOUR-CLAN-TAG]
For example:
0 * * * * crtools --out=/var/www/html \#JY8YVV
Note the \\
character before the # – that’s important. A ‘#’ is a comment
in most shells/scripting languages. You need to escape it to run it.
Development links
This project uses SonarQube for static analysis. The results of analysis are at SonarCloud. The code quality and test coverage are a work in progress.
If you wish to discuss development of this project, feel free to join us on Discord.
Contributors
All of the non-code contributors are listed in CONTRIBUTORS.rst
Image rights
All images included in this repository were created by the team, and are included in the GPL license. The SVGs were all created in Inkscape.
It was important to us to make sure the entirety of this application is open source, and not subject to takedown request. We will not ever extract assets from the game or from any other web properties.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for crtools-2.0.8-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49047ae1df3b39e1a751b6f853b0a1f8d80a84cfad5c7a2f64e3b9d44a6493d1 |
|
MD5 | 286c1141af1e72e983a8bd8498e39e94 |
|
BLAKE2b-256 | 287922bfd9a3a4f970d11a4f6485602d1ee02f07bb5c0cc35a872be3c1a4bff2 |