calendar update script: put calendar URL in variable
This commit is contained in:
parent
b09a5b9aa8
commit
9e56a06bc9
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/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)" \
|
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))' \
|
| jq -r '.[2] | map({_type: .[0]} + (.[1] | map({key: .[0], value: .[3]}) | from_entries))' \
|
||||||
> ./events.json
|
> ./events.json
|
||||||
|
|
Loading…
Reference in a new issue