diff options
author | Roger Gonzalez <roger@rogs.me> | 2022-08-09 15:20:11 -0300 |
---|---|---|
committer | Roger Gonzalez <roger@rogs.me> | 2022-08-09 15:20:11 -0300 |
commit | 269c2695f989c68c2aadff12c7f57741c0363c64 (patch) | |
tree | e4a401b4101bea0c844f21ec2ff9b2ea91757c6c /.doom.d/scripts | |
parent | 11110f25c9a214e15566e04af6ff989a96fdd53f (diff) |
Added extra doom emacs scripts
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 |