Push a xoops calendar into Google calendar
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
fetch.py
main.py
parse.py
sync.py

README.md

cal2google

Our laboratory runs an out-of-date xoops calendar to keep track of internal events. I often happen to miss events or mis-schedule personal appointments because the calendar is detached from my personal Google calendar.

This simple application grabs the xoops calendar as HTML, parses it, and synchronizes with a Google calendar.

Prerequisites

pip install gdata python-flags google-api-python-client

Authentication

The application uses OAuth2 authentication. To run it yourself, go to https://code.google.com/apis/console, click on "API Access", and obtain the following:

  • Google developer key ("API Key" under "Simple API Access", save this in gitignore/developer_key.txt)
  • Client id and secret (click on "Download JSON" and save result in gitignore/client_secrets.json)

Usage

  1. Set up authentication as described above.
  2. Specify the calendars you are interested in by editing main.py (and possibly fetch.py)
  3. Run main.py

Implementation Details

Every xoops calendar event has a calendar ID (cid) and an event ID (event_id). The combination of the cid and event_id uniquely identify the event. When saving events to Google calendar, the cid and event_id are written to the description field of the new Google calendar event entry. These are then used to index the Google calendar entries when updating.