Skip to content

chrisfsampaio/eventmaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON ➡️ .ics

A micro CLI to create .ics files from a JSON file.

Where can I use this?

This is particularly convenient if you use the iOS Simulator to develop apps that have calendar integration. Dragging the .ics file to the Simulator will allow you to add the event to the calendar with one click.

This can also be useful for any other case in which you need .ics files to be created systematically.

Installation

$ gem install eventmaker

Usage

The first thing you need is to create a file with the event information in the form of JSON, here's one example:

{
  "name" : "Event name",
  "organizer": "[email protected]",
  "start" : "2016/12/25 19:00",
  "end": "2016/12/25 21:00",
  "attendees": ["[email protected]", "[email protected]", "[email protected]"]
}

Once you have this file saved somewhere, you can run:

$ eventmaker ~/location/to/file.json >> ./event.ics

Supported fields

For the moment, the only supported event fields are the ones listed in the example above. If you feel like you could benefit from a field that is not supported, I'll gladly accept a PR adding it 😉.

If you are not really sure how to do that, it is really easy. Basically, there are two parts to it:

  1. Take a look at lib/eventmaker.rb to see how the event information is read from the JSON file.
  2. See icalendar docs and look for the field that you want to support.

About

CLI to create .ics files on the fly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages