2023-02-06 13:28:35 +01:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
# getting a nextcloud calendar without auth and convert it to org file
|
|
|
|
|
# add this to a cronjob
|
2023-02-17 12:27:17 +01:00
|
|
|
|
#
|
2023-02-06 13:28:35 +01:00
|
|
|
|
echo "updating calendar from nextcloud"
|
2023-02-17 12:27:17 +01:00
|
|
|
|
# public link to orgmode calendar of nextcloud https://cloud.tykayn.fr/index.php/apps/calendar/timeGridWeek/now
|
|
|
|
|
#URL="https://cloud.tykayn.fr/remote.php/dav/public-calendars/abcdeffffffffffffffffff\?export"
|
2023-02-06 13:28:35 +01:00
|
|
|
|
|
2023-10-15 21:35:33 +02:00
|
|
|
|
URL_CAL="https://cloud.tykayn.fr/remote.php/dav/public-calendars/cHkSk5rG445MftpZ?export" # calendrier tkwulfi
|
2023-02-06 13:28:35 +01:00
|
|
|
|
echo $URL_CAL
|
|
|
|
|
|
|
|
|
|
wget $URL_CAL -O orgcalendar.ics --show-progress
|
|
|
|
|
|
2023-02-17 12:27:17 +01:00
|
|
|
|
# add content of other calendars
|
|
|
|
|
#URL_CAL="https://cloud.tykayn.fr/remote.php/dav/calendars/super_admin_tykayn/mobilizonfr/?export"
|
|
|
|
|
#wget $URL_CAL -O ->> orgcalendar.ics --show-progress
|
|
|
|
|
|
|
|
|
|
# annivs
|
|
|
|
|
#URL_CAL="https://cloud.tykayn.fr/remote.php/dav/calendars/super_admin_tykayn/contact_birthdays/?export"
|
|
|
|
|
#wget $URL_CAL -O ->> orgcalendar.ics --show-progress
|
|
|
|
|
# convert the ics to an org file
|
2023-02-06 13:28:35 +01:00
|
|
|
|
du -sch orgcalendar.ics
|
|
|
|
|
icsorg -i orgcalendar.ics -o calendar.org -p 999999
|
|
|
|
|
cat calendar.org |wc -l
|
|
|
|
|
cp calendar.org ~/Nextcloud/textes/orgmode
|
|
|
|
|
echo "DONE"
|