diff options
Diffstat (limited to '.doom.d/scripts')
-rw-r--r-- | .doom.d/scripts/ics-to-org.el | 1 | ||||
-rwxr-xr-x | .doom.d/scripts/ics-to-org.sh | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/.doom.d/scripts/ics-to-org.el b/.doom.d/scripts/ics-to-org.el new file mode 100644 index 00000000..bf42c535 --- /dev/null +++ b/.doom.d/scripts/ics-to-org.el @@ -0,0 +1 @@ +(icalendar-import-file "/tmp/calendar/personal-calendar.ics" "~/.emacs.d/.local/cache/diary") diff --git a/.doom.d/scripts/ics-to-org.sh b/.doom.d/scripts/ics-to-org.sh new file mode 100755 index 00000000..7cf8f600 --- /dev/null +++ b/.doom.d/scripts/ics-to-org.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# This is a cron that runs every 15 mins and populates my emacs diary file with my calendar items + +# Downloading calendar +echo "Downloading Calendar" +mkdir -p /tmp/calendar +cd /tmp/calendar +wget "https://cloud.rogs.me/remote.php/dav/public-calendars/kRMMJ2CArQeCPzRi/?export" -O "personal-calendar.ics" -c +wget "https://files-f1.motorsportcalendars.com/f1-calendar_qualifying_sprint_gp.ics" -O "f1.ics" -c + +# Merge the calendars +cat f1.ics >> personal-calendar.ics + +#Generating the file + +echo "#Generating the file" +rm ~/.emacs.d/.local/cache/diary +emacs --batch -l ~/.doom.d/scripts/ics-to-org.el + +echo "#Deleting everything" +#Deleting everything +rm -r /tmp/calendar |