DEV Community

Cover image for How to Get Ics Files From External Shared Calendars
Rodrigo Medina
Rodrigo Medina

Posted on

How to Get Ics Files From External Shared Calendars

There can be some scenarios where you require to have all your shared calendars in a .ics file. In my case, it was the need to have the MLH calendar, that the staff shared to us, shared with my agenda in Spacemacs.

For doing this, I had to follow the next steps.

Get the link

Inside the configuration of the shared calendar, you have to get the calendar public URL.

img

Get the Calendar Id

Now you have to get src part from the url, for example, if the original url was

https://calendar.google.com/calendar/embed?src=en-gb.christian%23holiday%40group.v.calendar.google.com&ctz=Europe%2FParis

en-gb.christian%23holiday%40group.v.calendar.google.com
Enter fullscreen mode Exit fullscreen mode

Join the Calendar Id with the Calendar feed

The calendar feed usual structure is the following:

https://calendar.google.com/calendar/ical/**********/public/basic.ics
Enter fullscreen mode Exit fullscreen mode

You need to replace the * with the url you got in the step 2. In this case, it will end as the following.

https://calendar.google.com/calendar/ical/en-gb.christian%23holiday%40group.v.calendar.google.com/public/basic.ics
Enter fullscreen mode Exit fullscreen mode

Download the ics file

Now that you have the file URL, you can download it using wget.

wget -O my_cal.ics https://calendar.google.com/calendar/ical/en-gb.christian%23holiday%40group.v.calendar.google.com/public/basic.ics
Enter fullscreen mode Exit fullscreen mode

This information was hard to find for me, and if you find it useful, leave a like please. The original answer that provided this solution is found here .

Top comments (0)