This is a collection of tools I've been using to run squash tournaments at The Thorndon Club for Squash New Zealand, working around some of the peculiarities of iSquash, and using TournamentControl to schedule and run the tournaments. The use of TournamentControl is optional, but highly recommended. Other tournament software may be integrated into these tools in the future.
The tools include:
- The SquashNZ DrawMaker, a LibreOffice spreadsheet to facilitate making draws;
- A set of scripts to bulk-process data, e.g.
- mail-merging, and exporting email address lists for use in e.g. MailChimp;
- automatically making and seeding draws in iSquash after creating them in DrawMaker;
- searching the grading list, and bulk-registering players to waiting lists, so as to use them in the DrawMaker;
- automated entering of game scores for tournaments into iSquash.
- A set of scripts and templates to publish up-to-date draw and schedule information from TournamentControl to a web page;
- A template for draw posters, automatically generated from TournamentControl data;
- A score sheet template which can be used to print individual sheets for all the games, populated with the specific game data, as exported by TournamentControl;
There is a series of videos to explain how to use these.
I am not affiliated with Squash New Zealand. Fair use of their infrastructure is claimed. If you (ab)use these tools for any other purpose than squash tournament control, you may be held liable, as access is logged.
There are two ways in which you can download tctools
to your computer, or the one used for a tournament: downloading a Zip file, or using special software to track development of the tools.
The generally recommended way is to download a Zip file for every tournament, which you then unpack wherever you want it to live, and never worry about again post-tournament. In the event of bug fixes, you can either directly replace the affected files, or just re-download as required.
On the other hand, and especially if you are keen on contributing and helping making the tools better, please consider to use Git for Windows, which allows you to easily update as changes are made upstream, and also submit your changes and improvements back upstream.
Downloading Git and installing it might seem scary at first, as there are a lot of questions asked. However, you are fine just accepting the defaults for everything. Then, once installed, use the command line / PowerShell and enter:
git clone https://github.com/madduck/tctools.git
and you will find tctools
in the subdirectory tctools
. Easy as.
To update, change to that directory and run git pull
to upgrade the local copy to the latest version. Git is very cool, and here's starter article to read in case you're keen to learn.
The DrawMaker is written using LibreOffice, which you will need to install, as it uses functionality not available in Excel or Google Docs. You also need LibreOffice in combination with TournamentControl, as detailed in the next section:
If you want to use the scripts or tc2web — and trust me, you do, unless you want to make and seed draws manually, or enter results by hand – you will need to install Python, as detailed here. Please select "Manual Mode", and when asked about "Optional Features" during the install, make sure that only "pip" is selected:
And on the next screen, select to add "Python to the environment variables".
Once installed, you need to obtain the pytcnz
library, which used to be part of tctools
, but has been split off into a separate library. This can be done with a single command:
pip install git+https://github.com/madduck/pytcnz@main
python -m pytcnz.welcome
This is also the command to run to upgrade the library.
If you saw my little message, you should be good to go, e.g.
python scripts\search_grading_list.py --name martin --club WNTH --grade b
To remote-control iSquash, you need to install geckodriver. Grab the latest release (geckodriver-v0.30.0-win64.zip
at time of writing), open the Zip file, and copy the contained geckodriver.exe
file into the scripts
subdirectory of tctools
, or anywhere else where the operating system can find it (your "$PATH
").
Please note that if you install geckodriver
to the scripts directory, you can only run the scripts controlling iSquash from within that directory.
The Python libraries I use to read Excel and OpenDocument spreadsheets cannot deal with the outdated Excel format exported by TournamentControl. However, LibreOffice, which is a great Free Software alternative to Microsoft Excel and Google Docs, can.
To use the tools in this repository, you need to open the exported file in LibreOffice, and save it.
There is a script fix-tc-export.sh that does this.
Many of the scripts read configurable settings from the file tctools.ini
in the tctools
top directory. In this file, you may provide iSquash login details (so you don't always have to pass them on the command line), and other important settings. Please have a look at the tctools.ini.example
file.
Kelsey Mackay from KP sent me the draw templates she was using, which gave me the idea for the poster-maker, and informed the design.
Brent Gribbon of Attivo Design, also from KP, inspired me with the idea to publish draw and schedule data to a website, and provided his Windows-specific scripts, which I couldn't get working, and rewrote in Python. It was all downhill from there.
Thanks to Nick and Simon of DTKapiti for their software, and also for their patience and support answering questions, and setting up test tournaments.
And last but not least: huge thanks to Brad Watts, Nicole Georgel, and the rest of the folks at The Thorndon Club in Wellington for passing on their knowledge, and coaching me to get up and running quickly. None of what's here would be if it weren't for you, and the opportunity to serve as Squash Club Captain.
You are free to use any of the software you find here under the terms of the MIT License, basically meaning that you can do whatever you want, but you have to attribute copyright, and include a mention to this licence in whatever you do.
Of course, if you have any improvements, it would be nice if you fed them back to us.
Copyright © 2021–2022 martin f. krafft <tctools@pobox.madduck.net>