This is a fork of jmb's awesome widget that grabs the events with a private address instead of going through the tiresome process of Google's OAuth authentication.
Dashing widget to display the next and some subsequent Google Calendar events using the Google Calendar's private urls.
See the screenshot below
dashing install 39d3fde3afbffdd31093
Grab the private address of your calendar by going to your calendar's settings and look for the ICal button.
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.
- icalendar gem
- Moment.js
Stick gem 'icalendar'
into your Gemfile and run bundle install
.
Download the Moment javascript library and add to your javascript assets. Then lastly, make sure you have this at the top of assets/javascripts/application.coffee
.
#= require moment.js`
Thanks @jmb!
Guys, I was struggling against this EOF issue and found a hint. There may be a bug or limited support for 'https' depending on the version of Ruby (mine is 1.9.1). You need to specify whether this is https request.
so I changed the source code like this. you may find the part to replace. It works for me. I did not have any time to push the revision, so jsyeo may want to fix this.
(original codelet)
result = Net::HTTP.get uri
(to be replaced like this)
parsed_url = URI.parse(ical_url)
http = Net::HTTP.new(parsed_url.host, parsed_url.port)
http.use_ssl = (parsed_url.scheme == "https")
req = Net::HTTP::Get.new(parsed_url.request_uri)
result = http.request(req).body