Skip to content

pratikpc/gcal2ics

Repository files navigation

gcal2ics (Google Calendar To Google Cal ICS)

npm TypeScript code style: prettier Lint and Format Status Unit Test

Why

Recently, someone shared an embeded Calendar link with me.
A bit like https://calendar.google.com/calendar/embed?src=info@example.com
I for obvious reasons wanted to link that embeded Calendar with my Calendar app
However, direct copy-paste in this scenario would not work I needed to convert it to https://calendar.google.com/calendar/ical/info@example.com/public/basic.ics
So inspired from this SO answer to automate this process, I decided to create gcal2ics (there were a lot of links)

You can use our React website at https://pratikpc.github.io/gcal2ics-ui/

Sample Screenshot

Sample Screenshot

Usage

COMMAND LINE

> gcal2ics https://calendar.google.com/calendar/embed?src=info@example.com

https://calendar.google.com/calendar/ical/info@example.com/public/basic.ics

CODE

TypeScript/JavaScript

import gcal2ics from 'gcal2ics';

console.log(
    gcal2ics(
        'https://calendar.google.com/calendar/embed?src=info@example.com'
    )
);
// OUTPUT
// https://calendar.google.com/calendar/ical/info@example.com/public/basic.ics