hasadna/Open-Knesset — pull request #284 by OriHoch (2014-11-24 20:59:22+00:00)
Title: Added scraper that gets google calendar events from mk public calendar

The events are stored in mks.models.Event model

mks.models.Member gets 2 new fields:
calendar_url - where admins should add the google calendar url
calendar_sync_token - used to get only updated events each time

To get the calendar_url - you need to ask the MK to go to the calendar_settings and get the HTML share link.

You need to add a google token api key for it to work -
go to the google admin console (https://console.developers.google.com/)
create a new project > APIS > enable calendar api > credentials > public API access > create new key > server key > (leave IP restriction empty) > get the key
set the key in local_settings GOOGLE_CALENDAR_API_KEY

Need to setup a cron-job for the scraper:
./manage.py okscrape mks MksEventsScraper --dblog