Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bigpresh/ical-to-google-calendar

A script to sync an iCal/vcal calendar feed to a Google Calendar
https://github.com/bigpresh/ical-to-google-calendar

Last synced: 3 months ago
JSON representation

A script to sync an iCal/vcal calendar feed to a Google Calendar

Awesome Lists containing this project

README

        

=head1 ical-to-google-calendar

=head1 NOTICE

At present, this script WILL NOT WORK, as it relies on the CPAN module
L which
(at time of writing) uses an older API version which Google no longer support.

To get this working, either Net::Google::Calendar needs updating to use their
newer API, or this script needs to be switched to using
L but
I don't think it's a straightforward drop-in replacement, and I haven't had time
to do it (I no longer use this script myself. However, pull requests welcome!)

=head1 DESCRIPTION

A simple Perl script to parse an iCal-format (.ics) file, and update a Google
Calendar with it, via the Google Calendar API.

=head1 WHY?

Why not just add the iCal feed URL to Google Calendar and let them handle it?

Because they update horribly slowly (expect about once every 24 hours).

Calendaring is a time-sensitive thing; I don't want to wait a full day for
updates to take effect (by the time Google re-fetch the feed and update my
calendar, it could be too late!).

=head1 CONFIGURATION

The script will read your Google account details from C<~/.netrc>, where you
should specify them as e.g.:

machine calendar.google.com
login yourgoogleusername
password supersecretpassword

Of course, you'll want to ensure that file is well protected.

=head1 USAGE

./ical-to-gcal --calendar 'Calendar Name' --ical_url ical_url

The script will fetch the iCal calendar feed, then for each event in it,
add/update an event in your Google Calendar (the ID from the iCal feed is added
in the extra data of the event in the Google Calendar, so the script can match
them up next time).

The calendar name you provide must already exist in your Google Calendar
account.

The script adds a tag to each event's content to store the UID of the event
imported from the iCal feed so that events can be updated in future, or deleted
if they are no longer present in the source iCal feed. If you remove this tag
from an event, a new (duplicate) event will be created next time the script runs
(and the old event will be "orphaned") - so don't do that.

=head1 AUTHOR

David Precious C<< >>