Skip to content

Latest commit

 

History

History
162 lines (133 loc) · 5.34 KB

README.md

File metadata and controls

162 lines (133 loc) · 5.34 KB

IFSC Climbing Calendar and Live-Streams for 2024

ifsc logo



downloads scrutinizer update build


📖 TL;DR

This automatically generates an up-to-date calendar you can subscribe to using your favorite calendar app, to never miss an IFSC climbing event ever again. Currently supported formats are .ics (iCal) and json.

How?

Copy and paste this calendar URL https://calendar.ifsc.stream into your calendar subscriptions, and it will automatically sync with your device. This works on iPhone, Google Calendar, Proton Calendar, etc... This should keep you updated on future seasons as well.

Take a look at the setup guides for help.

🖥️ Web Version

Additionally, the calendar data is exported as JSON and can be viewed on this automatically updated website:

(From there you can also subscribe to the calendar with just a few clicks!)

👋 Intro

If you're constantly missing IFSC events because of a lacking calendar, or timezone confusions, then you're at the right place.

This command line tool uses IFSC's APIs, plus some scraping (because the available APIs don't provide precise schedules) to generate an always up-to-date calendar with all necessary info.

⭐️ Features

  • Updates automatically every hour
  • Fetches schedules directly from IFSC's website (using some APIs and fancy scraping)
  • Converts times to your local timezone
  • Alerts an hour before events start
  • Fetches stream URLs (and searches YouTube for missing ones)
  • Works for future seasons once dates are published (may require some tweaks)
  • Fetches start list for events
  • Works on any calendar (not just Google)
  • Fully open source
calendar

🛠 Usage

Docker

Using the pre-built Docker image

$ docker run -it --volume "$PWD:/calendar" \
    ghcr.io/sportclimbing/ifsc-calendar:latest \ 
    --season 2024 \
    --output "/calendar/ifsc-calendar.ics"

Note

All Docker images can be found on


Build Docker image locally

Build Docker image

$ docker build --tag ifsc-calendar .

Generate .ics calendar file

$ docker run -it --volume "$PWD:/calendar" ifsc-calendar \
    --season 2024 \
    --output "/calendar/ifsc-calendar.ics"

Generate .json calendar file

$ docker run -it --volume "$PWD:/calendar" ifsc-calendar \
    --season 2024 \
    --output "/calendar/ifsc-calendar.json" \
    --format json

Export multiple formats

$ docker run -it --volume "$PWD:/calendar" ifsc-calendar \
    --season 2024 \
    --output "/calendar/ifsc-calendar.json" \
    --format json,ics

Build app locally (without Docker)

Build executable

$ make

Generate .ics calendar file using the generated .phar

$ ./build/ifsc-calendar.phar \
  --season 2024 \
  --output "ifsc-calendar.ics"

🔧 Todo

  • Use Symfony serializer to build response object from IFSC API
  • Calculate average event duration (based on past events)
  • Add proper start lists to rounds
  • Add tickets URL?
  • Finish writing calendar setup guides
  • Cleanup PHP code
  • Add more tests
  • Make scraping more robust and fail on errors or missing data
  • Add more domain events to improve output log
  • Add automated tests to PRs (unit tests, coverage, etc)
  • Push Docker image to Docker Hub
  • Add BuyMeACoffee link to .ics calendar events
  • Show activity and warnings in console (domain events)
  • Validate newly generated calendar before publishing site
  • Search all YouTube API results (not only the first 50 results)
  • Check if there's an API to fetch events from instead of relying on scraping
  • Find a way to integrate events not posted on the official event page (e.g. Bern)
  • Disable youtube-fetch by default
  • Add links to specific events to calendar
  • Add latest tag to latest release
  • Always serve asset from latest release on calendar URL
  • Fetch stream links from YouTube API if none can be scraped
  • Automatically regenerate calendar and update release
  • Fix scraper for older seasons (formatting changes drastically)

Requirements

  • PHP 8.3
  • ext-dom
  • ext-libxml

Legal note

This is in no way affiliated with, or endorsed by the IFSC.