xSPN
Get statistical football predictions for major leagues and tournaments
AI summary · website content
Compare climbing conditions at crags near Seattle with forecasts for rain, temperature, wind, and air quality.
Sports & fitnessGo · Go TemplateGitHub @anton-evseevOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Weather-based climbing forecast in Go: scores how climbable each crag in a region is for each day of the week ahead and publishes the scores as a static site.
Loading the full README.
Read the full README ↗Cragcast is a climbing conditions forecast for areas within driving distance of Seattle. It uses green, yellow, and red ratings to help climbers compare crags and choose when to go.
The Go application fetches weather and air quality forecasts from Open-Meteo, scores morning and afternoon conditions for each crag, and generates static HTML. Ratings account for rain probability, drying, temperature, humidity, wind, and air quality, along with rock type, sun exposure, and seepage. Air quality forecasts use CAMS data. The website is hosted on Cloudflare Workers.
Live site: cragcast.org.
regions/ for scraping and serving forecasts.From the repository root, fetch a forecast and serve it:
make preview
Open 127.0.0.1:8090. Each run scrapes fresh data before starting the server. Stop it with Ctrl-C. Scraping does not require an API key.
Override the defaults with make preview REGION=seattle DATA_DIR=./data ADDR=127.0.0.1:8091.
Run the tests with go test ./....
Requires Git, Docker with Buildx, a builder that supports AMD64 and ARM64, and write access to the Docker Hub repository. From a repository checkout, run:
docker login
./publish-docker.sh
The script publishes AMD64 and ARM64 images to antonevseev/cragcast, tagged latest and with the current Git commit ID. Set IMAGE to override the repository name, without a tag.
Install Docker and copy publish-cloudflare.sh to the machine running the scheduled task. The task's account needs access to Docker and a writable working directory. Building the image on that machine is not required.
Create a Cloudflare API token with Workers Editor access scoped to the existing cragcast Worker. Do not put the token in the repository.
Set these variables in the environment of the scheduled task:
IMAGE: Docker image name and tag, such as antonevseev/cragcast:latest.WORK_DIR: writable directory for each run's files.CLOUDFLARE_API_TOKEN: Cloudflare API token.CLOUDFLARE_ACCOUNT_ID: Cloudflare account ID.REGION is optional and defaults to seattle.
Run the script on a schedule with these variables set:
sh /path/to/publish-cloudflare.sh
Each run pulls the image, scrapes the forecast, bundles the static pages, and deploys them through the Cloudflare API. If a command fails, the script skips the remaining steps and exits with an error after cleanup. With latest, new image releases are picked up automatically. The run directory is removed after successful and failed runs.
Open-Meteo requests have a 60-second timeout and up to four attempts for temporary failures. Retries wait 2, 4, and 8 seconds, or longer if the server requests it. Each region's scrape has a 10-minute deadline. Weather and air quality requests run in parallel, with locations batched together.
To deploy an existing bundle directly, set the Cloudflare variables and run:
cragcast deploy-cloudflare --from /path/to/bundle
The Worker name defaults to cragcast; use --worker to override it. Deployment uses HTML routing and the bundled 404.html page. No Wrangler installation or configuration file is required.
When upgrading from the Wrangler image, replace the publish script and image together before re-enabling the scheduled task.