This repo contains scripts to extract game data from GCG files in realtime for live stream broadcasts. Works as both a GUI and a CLI tool using the same script.
-
Automatic Dependency Handling: The script auto-installs required modules (no need to pre-install anything).
-
Dual Interface: The same script can be run as a graphical interface (GUI) or from the command line (CLI).
-
Version Selection: Supports both the default (
std) and Australian (au) versions of the script (choose with the optional--verparameter).std: outputs one score file containing both players' scoresau: outputs separate score files for Player 1 and Player 2
-
Python 3.9+ recommended (any modern Python 3 should work).
-
watchfilesmodule is installed automatically on first run but you must haverequirements.txt. If you prefer manual install instead, run:# Manual installation python -m pip install watchfiles # or python3 -m pip install watchfiles # on Windows if you use the launcher: py -m pip install watchfiles
Running the GUI presumes that you have the TK App installed (Windows & the official macOS python.org installers already include Tk.)
You have two options:
-
UI (Recommended)
- Clone the repo to your computer
- Double-click
watch_gcg.py
-
CLI
- Clone the repo to your computer
- Navigate to its directory in the Command Terminal
- Any one of these will open the GUI:
python watch_gcg.py # OR python3 watch_gcg.py # OR py watch_gcg.py # Windows launcher
- Use the dropdown menu at the top to choose between the Default and Australian versions.
- Use the
Browsebuttons to choose pre-existing files. - Press
Startto start watching the.gcgfile.
Note: DO NOT change the
Python exefield and DO NOT click on theFindbutton unless you specifically want to change the python executable that you're using. This field is pre-populated by the script, which automatically finds your python executable. If you change the field and can't figure out where your python executable lives, close and re-open the GUI using the methods detailed above.
The script needs 6 arguments:
- The input GCG file to watch
- The input lexicon file with definitions
- The output file name for the scores
- The output file name for the unseen tiles
- The output file name for the unseen tiles count
- The output file name for the last play
For example, to watch a GCG file called 'test.gcg', use the following command:
python3 watch_gcg.py --gcg test.gcg --lex CSW24defs.csv --score score.txt --unseen unseentiles.txt --count unseencount.txt --lp lastplay.txtTo output two separate score files, pass:
--ver au, and- either one
--scoreOR both--p1scoreand--p2score
python3 watch_gcg.py --gcg test.gcg --lex CSW24defs.csv --ver au --score score.txt --unseen unseentiles.txt --count unseencount.txt --lp lastplay.txt
# writes ./p1_score.txt and ./p2_score.txtpython3 watch_gcg.py --gcg test.gcg --lex CSW24defs.csv --ver au --p1score p1_score.txt --p2score p2_score.txt --unseen unseentiles.txt --count unseencount.txt --lp lastplay.txt
The script should now run indefinitely watching for changes to the GCG file. To stop execution in the terminal (CLI), hit Control-C. In the GUI, close the window.
The output files update when you save the game. Editing/committing moves in Quackle without saving the .gcg file won’t trigger changes.