Small shell + Python script for GeekTool on macOS. It fetches a public Environment Canada city page like:
https://weather.gc.ca/en/location/index.html?coords=45.403,-75.687
…and prints a compact CURRENT + 7-day FORECAST block suitable for a desktop geeklet.
Data source: Environment Canada weather (Government of Canada).
- macOS
- Python 3 available as
python3(macOS includes this) - GeekTool (or any shell runner that can execute a command on an interval)
No extra Python packages are required (stdlib only).
git clone https://github.com/dmccullo/GeekTool-Environment-Canada-Weather-Geeklet.git
cd GeekTool-Environment-Canada-Weather-GeekletSave Tools/envcan-geektool.sh anywhere on your Mac (for example ~/Documents/GeekTool/).
- Put the script somewhere permanent (example:
~/Documents/GeekTool/envcan-geektool.sh). - Make it executable:
chmod +x ~/Documents/GeekTool/envcan-geektool.shIf you want GeekTool to always run the exact file from your repo (great for verifying the “download + run” experience while developing), make the Documents path a symlink:
mkdir -p ~/Documents/GeekTool
ln -sf "$PWD/Tools/envcan-geektool.sh" ~/Documents/GeekTool/envcan-geektool.sh
chmod +x "$PWD/Tools/envcan-geektool.sh"- Open Environment Canada’s site and search your location.
- When you’re on the forecast page, copy the URL from your browser’s address bar.
- It will look like:
https://weather.gc.ca/en/location/index.html?coords=LAT,LON
- It will look like:
You can paste that full URL into the script with --url, or copy only the LAT,LON part for --coords.
- Open GeekTool → New Geeklet → Shell.
- Set refresh (example): 30s.
- Set the command to one of the examples below.
- Choose a monospace-friendly font and a geeklet size that avoids wrapping if you want the tightest layout.
/Users/you/Documents/GeekTool/envcan-geektool.sh --coords "45.403,-75.687"/Users/you/Documents/GeekTool/envcan-geektool.sh --url "https://weather.gc.ca/en/location/index.html?coords=45.403,-75.687"/Users/you/Documents/GeekTool/envcan-geektool.sh --coords "45.403,-75.687" --fahrenheitEquivalent:
/Users/you/Documents/GeekTool/envcan-geektool.sh --coords "45.403,-75.687" --units FCelsius (default):
/Users/you/Documents/GeekTool/envcan-geektool.sh --coords "45.403,-75.687" --units C/Users/you/Documents/GeekTool/envcan-geektool.sh --help- This script parses the public HTML page plus embedded JSON fragments. If Environment Canada changes their page structure, the script may need an update.
- Wind/humidity/visibility remain in metric units as shown on the Canadian page, even when temperatures are converted to Fahrenheit.
If you publish this on GitHub, add a license file you’re comfortable with (many small utilities use MIT). This README intentionally does not pick a license for you.
