waldhart-availability

Read and process availability from Waldhart software
git clone https://git.in0rdr.ch/waldhart-availability.git
Log | Files | Refs | Pull requests |Archive | README

README.md (1834B)


      1 # Waldhart availability
      2 
      3 Read and process availability from Waldhart software.
      4 
      5 Update availability on a CalDAV server (as events).
      6 
      7 An example environment file with the configuration options is given in `env`.
      8 
      9 ## Development setup
     10 ```bash
     11 python -m venv .venv
     12 source .venv/bin/activate
     13 pip install -r requirements.txt
     14 ```
     15 
     16 ## Tests
     17 ```bash
     18 coverage run .venv/bin/pytest
     19 ```
     20 
     21 ## Waldhart authentication
     22 Get session cookie:
     23 ```bash
     24 curl -b cookies.txt \
     25   -F'username=<USERNAME>' -F'password=<PASSWORD>'
     26   "https://savognin-desk.skischoolshop.com/login"
     27 ```
     28 
     29 ## Availability Data
     30 Check availability in Dec 2024:
     31 ```bash
     32 curl -s -H "Cookie: session_id=<SESSION_ID>" \
     33   "https://savognin-desk.skischoolshop.com/myavailability/myavailability_month/get_availability_json?year=2024&month=12" | jq
     34 ```
     35 
     36 Example response not available (NV):
     37 ```json
     38   "14": {
     39     "not_available": true,
     40     "on_call": false,
     41     "pm": false,
     42     "am": false,
     43 ```
     44 
     45 Example available at forenoon (AM, 08:00 - 12:00):
     46 ```json
     47   "9": {
     48     "not_available": false,
     49     "on_call": false,
     50     "pm": false,
     51     "am": true,
     52   },
     53 ```
     54 
     55 Example available at afternoon (PM, 12:00 - 16:00):
     56 ```json
     57   "20": {
     58     "not_available": false,
     59     "on_call": false,
     60     "pm": true,
     61     "am": false,
     62   },
     63 ```
     64 
     65 Example skiing/available all day:
     66 ```json
     67   "3": {
     68     "not_available": false,
     69     "on_call": false,
     70     "pm": true,
     71     "am": true,
     72 ```
     73 
     74 ## Caldav remotes
     75 
     76 Tested following remotes.
     77 
     78 GMX:
     79 * https://caldav.gmx.net/begenda/dav/users
     80 * https://hilfe.gmx.net/kalender/mobil/apps.html
     81 
     82 The python caldav library does not follow redirects on PROPFIND to the top-level CalDav URI.
     83 
     84 ```bash
     85 $ curl -XPROPFIND -vL https://caldav.gmx.net
     86 ...
     87 
     88 < HTTP/2 302
     89 < content-type: text/html
     90 < date: Sat, 20 Sep 2025 20:10:46 GMT
     91 < location: https://caldav.gmx.net/begenda/dav/users/
     92 ```