This repository has been archived on 2024-02-15. You can view files and clone it, but cannot push or open issues or pull requests.
webseite-krautspace/bin/calendar-events-exporter.sh

8 lines
351 B
Bash
Executable file

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