Home: Add calendar
This commit is contained in:
parent
49e0179832
commit
db0000244a
6 changed files with 37 additions and 1 deletions
9
fetch-calendar.sh
Executable file
9
fetch-calendar.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
ICAL_URL=https://cloud.hamburg.ccc.de/remote.php/dav/public-calendars/6CJcM7XDfoYire5d
|
||||
START_TIME=$(date -v-1d +%s) # yesterday
|
||||
END_TIME=$(date -v+1m +%s) # now + 1 month
|
||||
OUTFILE=data/calendar.json
|
||||
|
||||
curl -s $ICAL_URL\?export\&accept=jcal\&expand\=1\&start\=$START_TIME\&end\=$END_TIME | jq '.[2]|map({_type:.[0]}+(.[1]|map({key:.[0],value:.[3]})|from_entries))' > $OUTFILE
|
Loading…
Add table
Add a link
Reference in a new issue