From 269c2695f989c68c2aadff12c7f57741c0363c64 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Tue, 9 Aug 2022 15:20:11 -0300 Subject: Added extra doom emacs scripts --- .doom.d/scripts/ics-to-org.el | 1 + .doom.d/scripts/ics-to-org.sh | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .doom.d/scripts/ics-to-org.el create mode 100755 .doom.d/scripts/ics-to-org.sh (limited to '.doom.d/scripts') 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 -- cgit v1.2.3