Show off your Google Calendar in a nifty, Sinatra-powered events page.
See a demo running at http://christchurch.events.geek.nz
Event descriptions can be formatted in Markdown.
Sinatra GCal is designed to work out-of-the box on a single Heroku dyno, effectively making it free to host.
With the Heroku toolbelt installed, you can get up-and-running-with:
heroku create --stack cedar heroku config:add GCAL_CALENDAR_IDfirstname.lastname@example.org heroku config:add TIMEZONE="Pacific/Auckland" git push heroku master heroku open
The two settings you must have are the
GCAL_CALENDAR_ID and the
GCAL_CALENDAR ID you can find on the Calendar Settings page:
A list of available timezones can be found at https://gist.github.com/4654510
Options can be set via environment variables.
GCAL_CALENDAR_ID-- Mandatory, the Google Calendar ID (see above)
TIMEZONE-- Mandatory, the timezone in which to display the calendar
DAYS_LOOKAHEAD-- Optional, how many days ahead to show (default is 30)
ALLOW_HTML-- Optional, whether to allow HTML in event descriptions (default is false)
Sinatra GCal is written in Ruby (Ruby 1.9.3 recommended).
With Bundler installed:
ruby server.rb. If you want to reload the server each request (useful for development), install Shotgun and run
- Caching support (currently fetches the calendar every time a request is made)
- Tidy up the request code