Calendar Calculation on the Command Line: ics-query
Published on August 24, 2024 by Nicco Kunzmann
Due to the knowledge and time we put together in the last years to improve icalendar and python-recurring-ical-events (two components of the Open Web Calendar), it took niccokunzmann a few days to create a high-quality command line tool to work with .ics files: ics-query.
You can install ics-query with pip:
You can install ics-query with pip:
pip install ics-query
Now, it is easy with bash, sh zsh or any shell or script to access calendaring information from .ics files or calendar exports from different platforms. (Nextcloud, Google Calendar, Gancio, Outlook, Thunderbird, ...)
You can get a calendar from the web and see what is on. In this example, we show which German National Holidays happening in August 2024:
You can get a calendar from the web and see what is on. In this example, we show which German National Holidays happening in August 2024:
$ wget -qO- 'https://www.calendarlabs.com/ical-calendar/ics/46/Germany_Holidays.ics' | ics-query at 2024-08 - -
BEGIN:VEVENT
SUMMARY:Assumption Day (BY\, SL)
DTSTART;VALUE=DATE:20240815
DTEND;VALUE=DATE:20240815
DTSTAMP:20231013T092513Z
UID:[email protected]
SEQUENCE:0
DESCRIPTION:Visit https://calendarlabs.com/holidays/us/the-assumption-of-m ary.php to know more about Assumption Day (BY\, SL). \n\n Like us on Faceb ook: http://fb.com/calendarlabs to get updates LOCATION:Germany STATUS:CONFIRMED TRANSP:TRANSPARENT END:VEVENT
Combined with command line tools such a wget, curl, grep, sed or your programming language's ics-parser, you can get the events TODOs and journal entries from calendars on the web for small scripts and automations.
We