diff options
author | Jonas Smedegaard <dr@jones.dk> | 2024-01-31 01:19:19 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2024-02-01 08:25:53 +0100 |
commit | 7c09dd08ae2443b02eda763647f244faea2c205e (patch) | |
tree | cccc418a73d2a1f420d4ab2f825d3d93b4dc76a0 /bin | |
parent | 9eb1ffd6458b698a775b0d069e9e82032c63e847 (diff) |
add events
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/cal-fetch.sh | 29 | ||||
-rwxr-xr-x | bin/cal-render.sh | 15 |
2 files changed, 44 insertions, 0 deletions
diff --git a/bin/cal-fetch.sh b/bin/cal-fetch.sh new file mode 100755 index 0000000..6ec6561 --- /dev/null +++ b/bin/cal-fetch.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# Depends: wget + +set -eu + +rm -rf _CALENDARS +mkdir --parents _CALENDARS/study _CALENDARS/moodle + +# https://study.ruc.dk/bach/humtekbach +# (only 1st year events) +wget -O _CALENDARS/study/BP2.ics https://study.ruc.dk/ical/class/31211 +wget -O _CALENDARS/study/BK4.ics https://study.ruc.dk/ical/class/31213 +wget -O _CALENDARS/study/BK5.ics https://study.ruc.dk/ical/class/31214 +wget -O _CALENDARS/study/BK6-sustain.ics https://study.ruc.dk/ical/class/31217 +wget -O _CALENDARS/study/BK6-kunstig.ics https://study.ruc.dk/ical/class/31218 +wget -O _CALENDARS/study/BK6-datavis.ics https://study.ruc.dk/ical/class/31219 +wget -O _CALENDARS/study/BK6-sundhed.ics https://study.ruc.dk/ical/class/31221 +wget -O _CALENDARS/study/BK4-workshop-show.ics https://study.ruc.dk/ical/class/31248 +wget -O _CALENDARS/study/BK4-workshop-01_programming.ics https://study.ruc.dk/ical/class/31243 +wget -O _CALENDARS/study/BK4-workshop-02+03_fablab.ics https://study.ruc.dk/ical/class/31240 +wget -O _CALENDARS/study/BK4-workshop-04_unbuilt_city.ics https://study.ruc.dk/ical/class/33882 +wget -O _CALENDARS/study/BK4-workshop-05_sound.ics https://study.ruc.dk/ical/class/34162 +wget -O _CALENDARS/study/BK4-workshop-06_poetisk.ics https://study.ruc.dk/ical/class/33794 +wget -O _CALENDARS/study/BK4-workshop-extra.ics https://study.ruc.dk/ical/class/33803 + +# https://moodle.ruc.dk/calendar/managesubscriptions.php +# (Eksporter -> Alle+Tilpasset) +wget -O _CALENDARS/moodle/moodle.ics 'https://moodle.ruc.dk/calendar/export_execute.php?userid=45018&authtoken=cdf9146673052bbdab778036c2ed50e4715e76c2&preset_what=all&preset_time=custom' diff --git a/bin/cal-render.sh b/bin/cal-render.sh new file mode 100755 index 0000000..9203f7e --- /dev/null +++ b/bin/cal-render.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Depends: ical2html + +set -eu + +OUTDIR=events + +mkdir --parents "$OUTDIR/study" "$OUTDIR/moodle" + +icalmerge _CALENDARS/study/*.ics "$OUTDIR"/study/study.ics +icalmerge _CALENDARS/moodle/*.ics "$OUTDIR"/moodle/moodle.ics + +ical2html --monday --title "RUC HumTek-23 Study" 20240201 P140D "$OUTDIR"/study/study.ics > "$OUTDIR"/study/index.html +ical2html --monday --title "RUC HumTek-23 Moodle" 20240201 P140D "$OUTDIR"/moodle/moodle.ics > "$OUTDIR"/moodle/index.html |