...
 
Commits (3)
name: Meetup Calendar Microservice
opensourced: 2015
priority: 110
url: https://github.com/munen/meetup-calendar
url: https://github.com/twohundredok/meetup-calendar
technologies:
- ruby
- sinatra
......
......@@ -4,7 +4,7 @@ authors: Phil Hofmann
category: clojure
date-published: 2017-09-25
tags:
- opensource
- open source
- clojure
- filesystem
- database
......
......@@ -5,6 +5,8 @@ category: 200ok
date-published: 2017-11-02
tags:
- clojure
- open source
- web
uuid: 3ba310cb-836d-426c-9641-63524677ef11
---
......
---
title: Joint release of swiss-crowdfunder.com with ungleich glarus ag
authors: Alain M. Lafon
category: 200ok
category: open source
date-published: 2017-11-14
tags:
- 200ok
- open source
- crowdfunding
- swiss_crowdfunder
- products
- release
- ruby
- rails
- web
- ungleich
- ungleich_glarus_ag
uuid: 0fe5d5cf-0622-4abc-825a-9c8c0f8ba12d
......
---
title: Open source release of swiss-crowdfunder.com
authors: Alain M. Lafon
category: 200ok
category: open source
date-published: 2017-12-03
tags:
- 200ok
- open source
- ungleich
- ungleich_glarus_ag
- swiss_crowdfunder
- crowdfunding
- ruby
- rails
- web
uuid: 64a179eb59636d611924f2c75a23cd91
---
......
---
title: New release of our OSS crowdfunding platform swiss-crowdfunder.com
authors: Alain M. Lafon
category: 200ok
category: open source
date-published: 2018-10-14
tags:
- 200ok
- open source
- swiss_crowdfunder
- oss
- ruby
- rails
- web
uuid: E93EB457-D23A-43FF-9F27-FB6F60829EF1
description: >-
Release 1.1 of Swiss Crowdfunder featuring: Translatable user
......
---
title: Open sourcing voicerepublic.com under the GPL
authors: Phil Hofmann, Alain M. Lafon
category: 200ok
category: open source
date-published: 2019-05-14
tags:
- 200ok
- voicerepublic
- opensource
- open source
- ruby
- rails
- web
uuid: d17237d6-62c7-419a-a521-0154599f88ff
description: >-
The professional live audio streaming and archiving of events
......
......@@ -5,7 +5,7 @@ category: Org mode
date-published: 2019-08-05
tags:
- Emacs
- opensource
- open source
- org-web
uuid: 0154a908-6a30-4b83-9681-352a84021d34
description: >-
......
---
title: Render iCalendar feeds on the web
authors: Alain M. Lafon
category: open source
date-published: 2019-08-10
tags:
- open source
- ruby
- web
uuid: fe604f5e-d2e0-40e2-b91f-41b77128a9f5
description: >-
FOSS SaaS to display any iCalendar feed (for example a Meetup.com
Group or a Google Calendar) as an HTML calendar.
---
We all use calendars. Some digital calendars have a standardized
interface called iCalendar (see [[https://en.wikipedia.org/wiki/ICalendar][Wikipedia]]). An example are Meetup.com
Groups or Google Calendar.
Let's dig into one use case: Meetup is great to organize your local
meetup. Meetup also has great sharing and API options. They do support
embedding the meetup group together with the next meetup. However,
there is no out-of-the-box support to embed your schedule to another
website.
At 200ok, we support some websites that do want this kind of
integration. Therefore we have written a simple microservice in [[https://www.ruby-lang.org/en/][Ruby]]
with the [[http://sinatrarb.com/][Sinatra]] framework which solves this issue by accessing the
[[https://www.meetup.com/meetup_api/feeds/][Meetup calendar feeds API]]. This iCalendar2web microservice is for the
times when you do have an iCalendar feed (for example a meetup group
or a Google calendar), and you want to show them quickly on a website.
The microservice either yields a ready to use HTML table that you can
inject, or it returns the events in a simplified JSON structure.
You can host this project yourself or you can use a hosted SaaS
version (see below).
Please find the repository here:
[[https://github.com/twohundredok/iCalendar2web]]
** Demo
For example [[https://zen-temple.net/lambda-zen-temple/introduction/][Lambda Zen Temple]] posts the daily meditation schedule and
several other events to Meetup and integrates the same events into
their website. You can see this as a demo [[https://zen-temple.net/zen-temples/lambda-zen-temple/zen-meditation-schedule/][here]].
*** Plain
[[file:/img/2019/08/html_example.png]]
*** Integrated into a website
[[file:/img/2019/08/integrated_example.png]]
*** JSON Response
Request:
#+BEGIN_SRC restclient
GET https://icalendar-to-web.herokuapp.com/calendar/Zen-Meditation-Schweiz?filter=retreat&format=json
#+END_SRC
Results:
#+BEGIN_SRC js
[
{
"name": "One-Day-Retreat",
"start_time": "2019-08-25T10:00:00.000+02:00",
"end_time": "2019-08-25T17:00:00.000+02:00"
},
...
]
#+END_SRC
** Alternative use case
You can do the same for any calendar application that exports
iCalendar via HTTP. For example, if you want to embed a Google
calendar filtered down to specific keywords to your website.
** Use as a Service
iCalendar2web is generic in that it can render any public Meetup schedule.
Instead of installing iCalendar2web yourself, you can use this hosted
version:
[[https://icalendar-to-web.herokuapp.com/calendar/YourQualifier]]
With =YourQualifier= being the Meetup Group URL, eg
"Zen-Meditation-Schweiz".
*** iFrame
If you want to embed it to your own website, use an iframe - similar to
Youtube:
#+BEGIN_SRC html
<iframe width="800px" height="800px"
src="https://icalendar-to-web.herokuapp.com/calendar/Zen-Meditation-Schweiz"
frameborder="0">
</iframe>
#+END_SRC
*** Load via Ajax
You can also load the html via Ajax into your page. For example if you
want to show a loading spinner upfront. The required access-control
headers are set on this service, so no worries about CORS.
#+BEGIN_SRC javascript
$.get("https://icalendar-to-web.herokuapp.com/calendar/MyMeetupGroup", function(data) {
$("#my-schedule").html(data);
});
#+END_SRC
* Configuration
For iCalendar2web to run, you need to set a base URL. Most generic
calendar applications will export their various calendars using a URL scheme.
For example for meetup.com:
#+BEGIN_SRC shell
export ICALENDAR_URL="https://www.meetup.com/PLACEHOLDER/events/ical/"
#+END_SRC
For example for a Google calendar:
#+BEGIN_SRC
export ICALENDAR_URL="https://calendar.google.com/calendar/ical/PLACEHOLDER.calendar.google.com/public/basic.ics"
#+END_SRC
The *PLACEHOLDER* is the param you enter via =YourQualifier=.
* Parameters
iCalendar2web takes the following parameters:
- =filter=: takes a RegExp to filter the name of the meetup
- =show_from_to=: when set, this changes the default table columns
from
|date|time|
to
|date from|date to|
- =limit=: set a limit of how often a specific meetup shall be repeated
in the table, the default is 25. This flag is not supported for the
=json= response.
- =format=: when set to =json=, it returns the results as JSON and not
as an HTML table
** Examples
- =/calendar/YourQualifier=
- will show all events with the table columns
|date|time|
- =/calendar/YourQualifier?format=json=
- will show all events rendered in a JSON list
- =/calendar/YourQualifier?limit=5=
- will show up to 5 events per category with the table columns
|date|time|
- =/calendar/YourQualifier?limit=5&filter=retreat=
- will show up to 5 events that include 'retreat' in the title with
the table columns
|date|time|
- =/calendar/YourQualifier?limit=5&filter=retreat&show_from_to=1=
- will show up to 5 events that include 'retreat' in the title with
the table columns
| date from | date to |
* Deployment
** Heroku
Please refer to the documentation of Heroku to install
https://devcenter.heroku.com/articles/rack
* Running
Install Ruby (using [[https://github.com/rbenv/rbenv][rbenv]] in this example):
#+BEGIN_SRC shell
rbenv install
#+END_SRC
Install dependencies:
#+BEGIN_SRC shell
gem install bundler
bundle
#+END_SRC
Configure your iCalendar target URL by setting (more information see
[[*Configuration][Configuration]]):
#+BEGIN_SRC shell
export ICALENDAR_URL="https://www.meetup.com/PLACEHOLDER/events/ical/"
#+END_SRC
Run the application:
#+BEGIN_SRC shell
rackup config.ru
#+END_SRC