Skip to main content

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/

This tool is a static site generator – it generates static HTML, JavaScript, and CSS used to render the dashboard. If you wish to use this, you should set it up to run once per hour on your web server.

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] [--locale LOCALE] [--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

--locale LOCALE

Locale if language other than English is desired. Currently, only “fr” is valid.

--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

Other languages/locales

Crtools currently supports English and French. If you’d like to use French, add the following switch on the command line:

--locale=fr

If you wish for crtools to be available in another languages, reach out to me. I’m unable to do the translation myself (I speak only English), but I can help you provide a translation for this.

Suggested usage on a Linux web server

This tool is a static site generator – it generates static HTML, JavaScript, and CSS used to render the dashboard. If you wish to use this, you should set it up to run once per hour on your web server using cron or similar. Below is an example setup on Linux.

Assuming root is going to be running the script:

  1. Install this application via pip

  2. Install nginx or apache

  3. Find your document root (e.g., /var/www/html)

  4. Create /root/.crtools file as specified above, and add your API key (from https://developer.clashroyale.com), output path (the document root), and clan tag

  5. Create the following entry in your crontab:

0 * * * * crtools

Contributors

All of the non-code contributors are listed in CONTRIBUTORS.rst

Image rights

All images except the flags included in this repository were created by the team, and are included in the GPL license. The SVGs were all created in Inkscape.

The flags included are from http://www.famfamfam.com/lab/icons/flags/, which as of 5/27/2019 stated it required no attribution or license. We are interpreting this to mean these are available in the public domain.

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.

Optionally, crtools can download the official Clash Royale fan kit and use some of the content contained. This is not the default behavior, and no works copywritten by Supercell are contained within this code.

This content is not affiliated with, endorsed, sponsored, or specifically approved by Supercell and Supercell is not responsible for it. For more information see Supercell’s Fan Content Policy: https://supercell.com/en/fan-content-policy/

Metadata

Release files for crtools 2.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crtools 2.3.5
File Size Uploaded Provenance Actions
crtools-2.3.5.tar.gz 153.1 kB Without provenance Details for crtools-2.3.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crtools 2.3.5
File Interpreter ABI Platform Actions
crtools-2.3.5-py2.py3-none-any.whl Python 2, Python 3 none any Details for crtools-2.3.5-py2.py3-none-any.whl

Total release size: 386.8 kB

Release files / crtools-2.3.5.tar.gz

Download URL crtools-2.3.5.tar.gz
Size 153.1 kB
Tags Source
SHA-256 checksum
How to use checksums
778c56e317a91d6ecf942c817be39a8f70c715b0095ecad0f56484e38fafd10a
BLAKE2b-256 checksum
How to use checksums
9562b06045dc1e3b3f6e2441eb36ab31ea669da4572411b5dc560afc41d2408b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Release files / crtools-2.3.5-py2.py3-none-any.whl

Download URL crtools-2.3.5-py2.py3-none-any.whl
Size 233.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d29cf5f29fc795461fd7075e75c70157ea2ea2b7ad231a55c702a4ca934b721c
BLAKE2b-256 checksum
How to use checksums
e970624b20d4e1e98d2fcff719022169936d90a45ce4d036a2373f9f332a6002
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Security for crtools 2.3.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.3.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page