add nextcloud public calendar export

This commit is contained in:
Ludwig Behm 2023-10-19 23:29:05 +02:00
parent 01fcc976ba
commit 8e9e6d37fc
Signed by: l.behm
GPG key ID: D344835D63B89384
4 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
curl -sH "Accept: application/calendar+json" "https://cloud.kraut.space/remote.php/dav/public-calendars/2EkPGt3PF6WwYsA3?export&expand=1&start=$(date -d "" +%s)&end=$(date -d "next month" +%s)" \
| jq -r '.[2] | map({_type: .[0]} + (.[1] | map({key: .[0], value: .[3]}) | from_entries))' \
> ./events.json