Advanced Usage
This document provides a guide to advanced usage of the ical2jcal project.
Convert an online calendar to JSON
Calendar services line Nextcloud, Google Calendar and Microsoft Outlook can provide an link to a .ics file for your calendar.
In the example below, we convert the example calender from our project website to JSON.
Filter the JSON calendar with jq
Once converted, you can filter the JSON calendar using jq3.
In this example, we only print the prodid field of the calendar.
Output:
Here, we use jq to get all event summaries.
$ ical2jcal other-example.ics | jq '.[2][] | select(.[0] == "vevent") | .[1][] | select(.[0] == "summary") | .[3]'
Output:
Get today's events as JSON
Given you have a calendar file as a valid jCalendar, you can use different tools to filter the calendar by date and time and use the JSON output.