Dashing widget to display the next and some subsequent Google Calendar events using the Google Calendar API v3.
I use this widget to display my shift calendar - see the screenshot below
This widget works with API v3 and requires a service account to be set up via the Google Developer's Console. Once a project is set up, enable the Calendar API. On the Credentials page create a new OpenID and download the p12 key file - set up the path to this file in the job file and grant the email address access to the relevant calendar.
The job file defines how many events to get from the calendar and when to start the search. My version gets the next 6 events.
Add to Gemfile:
gem 'google-api-client', '>= 0.8'
Run
bundle install
Download the Moment javascript library and add to your javascript assets. Add #= require moment.js
to the application.coffee script. You can also use moment.min.js
if you've downloaded that.
Great job with this widget!
It is working as it should except that I have special letters in my language but it is just these 3 chars: å ä ö. These 3 are very common Swedish letters. So whenever there is an event containing one of those letters the widget breaks and displays nothing with the following error from logs:
If I remove the event with one of those letters, error goes away. I've been trying to fix this for the past 2 hours with zero success. Help anyone?
Best case: The widget displays the text with the special chars (å ä ö) Worst case: The ö is converted to o and å ä to a