I am looking for a way to make NC respond to a query, if a repeating event is due today or not.
For example, a repeating event is defined like this:
BEGIN:VEVENT ... SUMMARY: xyz DTSTART;TZID=Europe/Berlin:20200103T180000 DTEND;TZID=Europe/Berlin:20200104T010000 RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=FR;UNTIL=20201225T000000 ... END:VEVENT
This event has been created in January, and the next occurrence will be next Friday, February 14th. A script, that is to control a machine, would need the individual date, start and end time.
I was thinking of a function that, when remotely triggered, would return the start and end of events due $today. Something like this:
client machine (curl or wget) > query remote NC ($event, $today) > answer: ($event, $start, $end)
Is there any way to achieve this?
As an alternative, I could make use of a program, script or function that will split repeating events into individual events, after I download the calendar to a local ics file. Of course that would mean an event like the above example will turn into 25 single events, but once there are entries like this in the local copy, I can easily extract DTSTART and DTEND and use that information:
BEGIN:VEVENT ... SUMMARY: xyz DTSTART;TZID=Europe/Berlin:20200214T180000 DTEND;TZID=Europe/Berlin:20200215T010000 ... END:VEVENT
Any chance of doing this?