commit c1e1da9f9ff2982c33c3fccb44f4820bb3af03c3
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date: Sun, 1 Dec 2024 23:37:50 +0100
feat: add Readme
Diffstat:
A | README.md | | | 72 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 72 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md
@@ -0,0 +1,72 @@
+# Waldhart availability
+
+Read and process availability from Waldhart software.
+
+Update availability on a CalDAV server (as events).
+
+An example environment file with the configuration options is given in `env`.
+
+## Development setup
+```bash
+python -m venv .venv
+source .venv/bin/activate
+pip install -r requirements.txt
+```
+
+## Tests
+```bash
+coverage run .venv/bin/pytest
+```
+
+## Waldhart authentication
+Get session cookie:
+```bash
+curl -b cookies.txt \
+ -F'username=<USERNAME>' -F'password=<PASSWORD>'
+ "https://savognin-desk.skischoolshop.com/login"
+```
+
+## Availability Data
+Check availability in Dec 2024:
+```bash
+curl -s -H "Cookie: session_id=<SESSION_ID>" \
+ "https://savognin-desk.skischoolshop.com/myavailability/myavailability_month/get_availability_json?year=2024&month=12" | jq
+```
+
+Example response not available (NV):
+```json
+ "14": {
+ "not_available": true,
+ "on_call": false,
+ "pm": false,
+ "am": false,
+```
+
+Example available at forenoon (AM, 08:00 - 12:00):
+```json
+ "9": {
+ "not_available": false,
+ "on_call": false,
+ "pm": false,
+ "am": true,
+ },
+```
+
+Example available at afternoon (PM, 12:00 - 16:00):
+```json
+ "20": {
+ "not_available": false,
+ "on_call": false,
+ "pm": true,
+ "am": false,
+ },
+```
+
+Example skiing/available all day:
+```json
+ "3": {
+ "not_available": false,
+ "on_call": false,
+ "pm": true,
+ "am": true,
+```